Hi Boki,
I have a nextrgrid5 where I handle CellColoringEvent(Sender: TObject; ACol,
ARow: Integer; var CellColor, GridColor: TColor; CellState: TCellState); to change the CellColor. I did this according to level of the Row.
procedure TFrmReport.gridReportCellColoring(Sender: TObject; ACol, ARow: Integer; var CellColor, GridColor: TColor; CellState: TCellState);
begin
if not (csSelected in CellState) then
begin
if ARow = gridReport.RowCount -1 then
begin
CellColor := $0080FFFF;
end
else if (ARow < gridReport.RowCount-1) and (gridReport.GetLevel(ARow) = 0) then
CellColor := $00FFAAAA
else
CellColor := $00FFAA77;
end;
end;
I can't figure out how to do this in Nextgrid6. Your help is welcome.
I have found an event DrawBackGround but it looks like I have to draw the cell by myself. Is there a function that I can call to draw the default cell or provide it a background color?