Jump to content

hyperlink in dbgrid cell


Guest

Recommended Posts

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...