procedure cxgrdbtblvwGrid1DBTableView1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
BColor, FColor: TColor;
begin
BColor := ACanvas.Canvas.Brush.Color;
FColor := ACanvas.Canvas.Font.Color;
if kbmtblQBC1.FieldByName('ZKState').AsString = '待审核' then
begin
BColor := $00B3BBEA; //clred;
FColor := clBlue;
end;
end;
设置cxGrid某条件下颜色
最新推荐文章于 2024-02-23 11:56:56 发布
这篇博客讲解了如何在TcxCustomGridTableView的CustomDrawCell事件中,根据数据字段判断,动态改变单元格背景和文字颜色。当'ZKState'字段为'待审核'时,使用特定颜色组合以增强视觉提示。

762

被折叠的 条评论
为什么被折叠?



