Jump to content

uniDBGrid custom Cell Values/Href/Links etc ??


CastleSoft

Recommended Posts

Does anyone have a snippet of how to add a custom field to the uniDBGrid ?

 

I would like to add a URL which can be from a database calculated field.

 

The OnDrawCell in DBGrid doesn't appear to have a Values property ? Like the uniGrid does ?

 

I may have missed something ? (or I'm blind ?)

 

Thanks

Andrew

 

Link to comment
Share on other sites

Use field.ongettext in you table, for example:

procedure TUniMainModule.qryTmpwerGetText(Sender: TField; var Text: string;
  DisplayText: Boolean);
begin
 //you can use html also as text
 Text:='xxxxxxx';
end;
Link to comment
Share on other sites

Add your calculated Field directly on your sql statment.

"Select ....,Field1 || Field2 as MyURLField From..."

 

And declare MyURLField as a persistant Field (Data) on your ClientDataSet or QueryDataSet.

I used this well in the past with UIB, as it don't support Calculated Field.

 

Regards.

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...