DbGridEh中改变行的颜色

代码也挺简单的,只是当时没有想到:

if ds2.FieldByName('AutoRead').AsInteger=0 then
begin
  DBGridEh1.Canvas.Brush.Color:=clGrayText;
  DBGridEh1.Canvas.Font.Color:=clWhite;
  DBGridEh1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;

你可能感兴趣的:(grid)