CODE
procedure TNextGridFrame.dbgAddInCellColoring(Sender: TObject; ACol,
ARow: Integer; var CellColor, GridColor: TColor; CellState: TCellState);
begin
if (ACol > 1) then
begin
if (not (csSelected in CellState))
and (ARow mod 2 = 0) then CellColor := RGB(245, 245, 245);
end;
end;
ARow: Integer; var CellColor, GridColor: TColor; CellState: TCellState);
begin
if (ACol > 1) then
begin
if (not (csSelected in CellState))
and (ARow mod 2 = 0) then CellColor := RGB(245, 245, 245);
end;
end;
However, this also colors rows where no data is available. So if you've a grid which displays an empty dataset, then you get alternating line coloring for the totality of the grid. This is confusing for the user. Is there a way to detect if the cell/row contains data.
Thanks.











