ice Posted July 21, 2016 Share Posted July 21, 2016 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 21, 2016 Share Posted July 21, 2016 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. Quote Link to comment Share on other sites More sharing options...
ice Posted July 21, 2016 Author Share Posted July 21, 2016 Thanks Delphi Developer, this is work in one cell, but i need two different color in one cell. Quote Link to comment Share on other sites More sharing options...
ice Posted July 21, 2016 Author Share Posted July 21, 2016 Hi, i founded. I make cell to DisplayMemo = true, and set in CustomCss background-color. 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.