Kanat Posted October 14, 2015 Share Posted October 14, 2015 How to change the row font color UniDbGrid? Thanks. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 14, 2015 Share Posted October 14, 2015 Hi, UniDBGrid1 -> OnDrawColumnCell Attribs.Color - row (cell) Color Attribs.Font.Color - font Color try to analyze the demo: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\GridEditors procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if Column.FieldName = 'Shift' then begin if Column.Field.AsBoolean then Attribs.Font.Color := clGreen else Attribs.Font.Color := clRed; end; end; Best regards. 1 Quote Link to comment Share on other sites More sharing options...
Kanat Posted October 14, 2015 Author Share Posted October 14, 2015 Thanks, Row font color if UniDBGrid1.DataSource.DataSet.FieldByName('STATUS_ID').AsInteger=1 then begin Attribs.Font.Style:=[fsbold]; Attribs.Font.Color:=clred; end; 1 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.