Board index » delphi » VCL.Net Grid Problem

VCL.Net Grid Problem


2004-07-19 01:07:07 AM
delphi250
I posted a question in delphi.vcl.components.using.dotnet about the
DbGridDrawDataCell event not firing. I didn't get any answers.. can anyone
else confirm this behavior? Should I post the problem on Quality Central?
--
John
 
 

Re:VCL.Net Grid Problem

"JohnE" <XXXX@XXXXX.COM>schreef in bericht
Quote
I posted a question in delphi.vcl.components.using.dotnet about the
DbGridDrawDataCell event not firing. I didn't get any answers.. can
anyone
else confirm this behavior? Should I post the problem on Quality Central?

--
John

Just did a quick test (see below). Looks OK to me.
Note though that DrawDataCell has been marked obsolete for a while now,
use DrawColumnCell.
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; Rect: TRect;
Field: TField; State: TGridDrawState);
begin
if Odd(Table1.RecNo) then
DBGrid1.Canvas.Brush.Color := clMoneyGreen
else
DBGrid1.Canvas.Brush.Color := clSkyBlue;
DBGrid1.DefaultDrawDataCell(Rect, Field, State);
end;
Kind regards,
Dirk Andries.