Código
De preferência, deixem a opção dgRowSelect selecionada.
No evento OnDrawColumnCell digite este procedimento:
if odd(ClientDataSet1.RecNo) then
DBGrid1.Canvas.Brush.Color:= $00B9FFFF
else
DBGrid1.Canvas.Brush.Color:= clCream;
TDbGrid(Sender).Canvas.font.Color:= clBlack;
if gdSelected in State then
with (Sender as TDBGrid).Canvas do
begin
Brush.Color := $004080FF;
FillRect(Rect);
Font.Style := [fsbold]
end;
TDbGrid(Sender).DefaultDrawDataCell(Rect, TDbGrid(Sender).columns[datacol].field, State);
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009