Tokay Posted July 13, 2017 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
Sherzod Posted July 13, 2017 Posted July 13, 2017 http://forums.unigui.com/index.php?/topic/7525-grid-canvas/&do=findComment&comment=38357 Quote
Tokay Posted July 13, 2017 Author 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
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.