CastleSoft Posted June 10, 2015 Share Posted June 10, 2015 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 More sharing options...
mhmda Posted June 10, 2015 Share Posted June 10, 2015 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 More sharing options...
Abaksoft Posted June 10, 2015 Share Posted June 10, 2015 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now