Jump to content

hyperlink in dbgrid cell


Guest

Recommended Posts

Message from: "Trebor"

 

Is it possible to make a value in a dbgrid's cell look to act a hyperlink

?

 

(if not, is it possible to make it to look like a hyperlink - with crHand

cursor when mouse over) ?

 

Thanks

 

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Trebor" wrote in message

news:MwvhoFd3LHA.2168@anaxagvs227...

> Is it possible to make a value in a dbgrid's cell look to act a hyperlink

> ?

>

> (if not, is it possible to make it to look like a hyperlink - with crHand

> cursor when mouse over) ?

 

In webmode grid cells accept html content, so you can put a

(see below) in a ReadOnly columns cell.

 

'Google'

 

PS: Column should be ReadOnly so a click in cell will call the hyperlink.

 

 

.

 

Link to comment
Share on other sites

Message from: "Trebor"

 

Thanks Farshad.

 

But, if I want to call another TUniFrame in the same application by clicking

a hyperlink the application is restarting.

 

This is my code:

 

procedure TMainForm.GridDrawColumnCell(Sender: TObject; ACol, ARow: Integer;

var Value: string; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);

begin

if (Column.Field.Index = 0) then

Value := ''+Value+'';

end;

 

procedure TMainForm.GridCellClick(Column: TUniDBGridColumn);

begin

if (Column.Field.Index = 0) then

InsertFrame('Labels');

end;

 

Any help?

 

Thanks.

 

"Farshad Mohajeri" wrote in message

news:tmRNJQd3LHA.1648@anaxagvs227...

>

> "Trebor" wrote in message

> news:MwvhoFd3LHA.2168@anaxagvs227...

>> Is it possible to make a value in a dbgrid's cell look to act a hyperlink

>> ?

>>

>> (if not, is it possible to make it to look like a hyperlink - with crHand

>> cursor when mouse over) ?

>

> In webmode grid cells accept html content, so you can put a

> (see below) in a ReadOnly columns cell.

>

> 'Google'

>

> PS: Column should be ReadOnly so a click in cell will call the hyperlink.

>

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Trebor" wrote in message

news:ic$GMan3LHA.1648@anaxagvs227...

> Thanks Farshad.

>

> But, if I want to call another TUniFrame in the same application by

> clicking a hyperlink the application is restarting.

>

> This is my code:

>

> procedure TMainForm.GridDrawColumnCell(Sender: TObject; ACol, ARow:

> Integer; var Value: string; Column: TUniDBGridColumn; Attribs:

> TUniCellAttribs);

> begin

> if (Column.Field.Index = 0) then

> Value := ''+Value+'';

> end;

>

> procedure TMainForm.GridCellClick(Column: TUniDBGridColumn);

> begin

> if (Column.Field.Index = 0) then

> InsertFrame('Labels');

> end;

>

> Any help?

 

try this:

Value := ''+Value+'';

 

 

 

.

 

Link to comment
Share on other sites

Message from: "Trebor"

 

Thanks.

 

"Farshad Mohajeri" wrote in message

news:2xD5$jw3LHA.2168@anaxagvs227...

>

> "Trebor" wrote in message

> news:ic$GMan3LHA.1648@anaxagvs227...

>> Thanks Farshad.

>>

>> But, if I want to call another TUniFrame in the same application by

>> clicking a hyperlink the application is restarting.

>>

>> This is my code:

>>

>> procedure TMainForm.GridDrawColumnCell(Sender: TObject; ACol, ARow:

>> Integer; var Value: string; Column: TUniDBGridColumn; Attribs:

>> TUniCellAttribs);

>> begin

>> if (Column.Field.Index = 0) then

>> Value := ''+Value+'';

>> end;

>>

>> procedure TMainForm.GridCellClick(Column: TUniDBGridColumn);

>> begin

>> if (Column.Field.Index = 0) then

>> InsertFrame('Labels');

>> end;

>>

>> Any help?

>

> try this:

> Value := ''+Value+'';

>

>

>

.

 

Link to comment
Share on other sites

Message from: "Trebor"

 

Thanks.

 

"Farshad Mohajeri" wrote in message

news:2xD5$jw3LHA.2168@anaxagvs227...

>

> "Trebor" wrote in message

> news:ic$GMan3LHA.1648@anaxagvs227...

>> Thanks Farshad.

>>

>> But, if I want to call another TUniFrame in the same application by

>> clicking a hyperlink the application is restarting.

>>

>> This is my code:

>>

>> procedure TMainForm.GridDrawColumnCell(Sender: TObject; ACol, ARow:

>> Integer; var Value: string; Column: TUniDBGridColumn; Attribs:

>> TUniCellAttribs);

>> begin

>> if (Column.Field.Index = 0) then

>> Value := ''+Value+'';

>> end;

>>

>> procedure TMainForm.GridCellClick(Column: TUniDBGridColumn);

>> begin

>> if (Column.Field.Index = 0) then

>> InsertFrame('Labels');

>> end;

>>

>> Any help?

>

> try this:

> Value := ''+Value+'';

>

>

>

.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...