設置UniDbGrid的整行顯示顏色,如果某字段值是我們的控制字段,使用下列判斷設置更快捷一點: procedure TUniForm.UniDBGridDrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if Column.Field.DataSet.FieldByName('fcontrol').AsString = 'control.color' then Attribs.Color := control_color else Attribs.Color := clWhite; end; --------------------- 作者:德魯克 來源:CSDN 原文:https://blog.csdn.net/robinlovoy/article/details/80570008 版權聲明:本文為博主原創文章,轉載請附上博文鏈接!