AndersonSOS Posted October 10, 2017 Share Posted October 10, 2017 Hello good afternoon, I would like to know how to change the font and colors of a dbgrid line at run time. for example, if any field in the dataset is of a format to change the color of the dbrid. Best regards Anderson Manoel Ribas Brazil Link to comment Share on other sites More sharing options...
belo Posted October 10, 2017 Share Posted October 10, 2017 procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if UniDBGrid1.DataSource.DataSet['Name'] = 'Brazil' then begin Attribs.Font.Color := clBlack; Attribs.Font.Style := [fsBold]; Attribs.Color := RGB(255, 231, 147); end; end; Link to comment Share on other sites More sharing options...
AndersonSOS Posted October 10, 2017 Author Share Posted October 10, 2017 Hello Eduardo, Sorry, do not enter the component correctly. What I am using is the TUniMDbGrid component that is part of the mobile packages but it does not have the DrawColumnCell function. For web packages I use it that way. I thank you Link to comment Share on other sites More sharing options...
lmacierinha Posted March 28, 2018 Share Posted March 28, 2018 Anderson Did you succeded solve your problem? I´m now with the same problem. Luis Claudio São José do Rio Preto - SP Brasil Link to comment Share on other sites More sharing options...
Recommended Posts