设置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;