AndersonSOS Posted October 10, 2017 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
belo Posted October 10, 2017 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;
AndersonSOS Posted October 10, 2017 Author 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
lmacierinha Posted March 28, 2018 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
Recommended Posts