Ver Mensaje Individual
  #9  
Antiguo 01-08-2013
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 685
Reputación: 19
olbeup Va camino a la fama
Que problemas tienes con el RecNo del DBGrid, es un dato automático, si borras un registro el RecNo se actualizará automáticamente.

Código Delphi [-]
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
const
  COLORS : array[Boolean] of TColor = (clYellow, clMoneyGreen);
var
  DS: TDataSet;
begin
  DS := DBGrid1.DataSource.DataSet;
  with DBGrid1 do
  begin
    Canvas.Brush.Color := COLORS[((DS.RecNo mod 2) = 0)];
    DefaultDrawColumnCell(Rect, DataCol, Column, State);
  end;
end;
Que problemas tienes con esto.

Un saludo.
__________________
Al hacer una consulta SQL, haz que los demás te entiendan y disfruten de ella, será tú reflejo de tú saber.
Responder Con Cita