This will do exactly what you require:
-Rob.
procedure TForm1.DBGrid1DrawColumnCe
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
// Memo1.Lines.Add(inttostr(R
if Rect.Top mod 36 = 0 then
begin
DBGrid1.Canvas.Brush.color
DBGrid1.Canvas.FillRect(Re
end;
DBGrid1.Canvas.TextOut(Rec
end;
Meikl.. I don't see rows highlited...
Main Topics
Browse All Topics





by: kretzschmarPosted on 1999-09-03 at 08:48:09ID: 2021330
hi stevenorris;
ll(Sender: TObject; const Rect: Trect; := Color; ct); ell(Rect, DataCol, Column, State);
try this, on the event OnDrawColumnCell
procedure TForm1.DBGrid1DrawColumnCe
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var Color : TColor;
begin
if not(gdSelected in state) then
begin
if (Table1.RecNo mod 2)=1 then
Color := RGB(224, 231, 223) //a color
else
Color := RGB(254, 255, 239); //another color
Dbgrid1.Canvas.Brush.Color
Dbgrid1.Canvas.FillRect(Re
end;
dbGrid1.DefaultDrawColumnC
end;
meikl