Jump to content
uniGUI Discussion Forums
Sign in to follow this  
AndersonSOS

Change the font and color of the line in dbgrid

Recommended Posts

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

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Anderson

 

Did you succeded solve your problem?

I´m now with the same problem.

 

Luis Claudio

São José do Rio Preto - SP

Brasil

Share this post


Link to post
Share on other sites
Sign in to follow this  

×