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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...