Jump to content

Recommended Posts

Posted

Hi,

 

is it possible to make different Color in dbgridcell with html tags like id, class or style ?

 

(<t id="xyz" >10:00 - 12:00 aaaaa</t><br>

 <t id="abc" >13:00 - 18:00 bbbbb</t>)

 

one Cell:

10:00 - 12:00 aaaaa   < red backcolor

13:00 - 18:00 bbbbb   < blue backcolor

 

 

 

 

Posted

Hi,

 

Have you tried use this ?,

for example:

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...