Цитата:
Do not write an OnDrawDataCell event handler. OnDrawDataCell is obsolete and included for backward compatibility. Instead, write an OnDrawColumnCell event handler.
|
используй OnDrawColumnCell. вкратце:
Код:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (OraQuery1.FieldByName('KODNAIM').AsInteger mod 2)=0 then
DBGrid1.Canvas.Brush.Color:=clRed;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;