Hi waelolabi
in your dbGrid onDrawCell write this code:
procedure TForm1.DBGrid1DrawColumnCe
DataCol: Integer; Column: TColumn; State: TGridDrawState);
const
FIELD_NAME = 'STATUS';
begin
with (Sender as TDBGrid), Canvas do begin
if not(gdSelected in State) then begin
case Column.Field.DataSet.Field
1: Brush.Color := clRed;
end;
FillRect(Rect);
end;
DefaultDrawColumnCell(Rect
end;
end;
Hope it will help you
Regards Ferhad
Main Topics
Browse All Topics





by: coondogPosted on 2003-04-23 at 12:13:04ID: 8382765
Here is a good place to start:
brary/week ly/aa03169 9.htm
http://delphi.about.com/li
Rich