Developer

OnGetCellColor

Occur in moment of painting Cell's background.

property OnGetCellColor: TNxGetCellColorEvent read FOnGetCellColor write FOnGetCellColor;Parameter CellColor may be set in order to change Color of background.

Example:


procedure TForm1.NxReportGridView61GetCellColor(Sender: TObject; ACol, ARow: Integer; var CellColor: TColor; State: TNxCellDrawState); begin if not (csSelected in State) then begin if ARow = -1 then CellColor := clCream; // insert row if ARow mod 2 = 0 then CellColor := clMoneyGreen; // color every next row end; end;

Remarks


CellColor is first set internally by grid using Color properties of Cell and/or Column.

See also