Tokay Posted July 13, 2017 Share Posted July 13, 2017 I try to format text in the cells, but Attribs.AsString is read-only property. Could I change text which will be displayed in a cell in some way? Thank you. procedure TUniForm2.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if ACol > 0 then Attribs.AsString := FormatTriad(Column.Field.AsString); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2017 Share Posted July 13, 2017 Hi, Sorry, what you wanted ?! Best regards, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2017 Share Posted July 13, 2017 http://forums.unigui.com/index.php?/topic/7525-grid-canvas/&do=findComment&comment=38357 Quote Link to comment Share on other sites More sharing options...
Tokay Posted July 13, 2017 Author Share Posted July 13, 2017 I got it! Thank you very much. I do it in that way: After sql query, i add OnGetText handers to needed fields: IBQuery1.Fields[i].OnGetText := IBQuery1YGetText And in the handler: Text := FormatFileSize(Sender.AsLargeInt); All works great! Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.