VCL Delphi

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
with (Sender as TDBGrid).Canvas do
begin
//case (DataSource.DataSet as TBDEDataSet).UpdateStatus of
case (Ds1.DataSet as TADODataSet).UpdateStatus of
//.UpdateStatus) of
// .DataSet.UpdateStatus of
// usUnmodified:Brush.color:=clcream;
usInserted : Brush.Color := clRed;
usModified : Brush.Color := clBlue;
usDeleted : begin Brush.Color := clBlack; Font.Color := clWhite; end;
end;
Dbgrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;