OK hab es oben mal geändert, danke für den Tip.
Wegen des codes meinst du so:
Delphi-Quellcode:
procedure TFRM_Main.DBG_RechnerDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
farbe: Integer;
begin
with (Sender as TDBGrid) do
begin
if (gdSelected in State) then
begin
Canvas.Brush.Color := clskyblue;
end
else
begin
if Odd(DM_Rechner.ADO_DS_Rechner.RecNo) then
farbe := clSilver
else
farbe := clWhite;
{end; ist zu viel}
canvas.brush.Color := farbe;
canvas.Font.Color := ClBlack;
end;
canvas.FillRect(rect);
canvas.TextOut(Rect.Left + 2, rect.Top + 1, column.Field.AsString);
end
end;