Developer

OnCellFormating

Occurs while text inside cell is drawing. It gives possibility to set custom Font TColor or TFontStyle based on ACol and ARow parameters.

property OnCellFormating: TCellFormatingEvent read FOnCellFormating write FOnCellFormating;

Example:


Add NxColumns in uses first.

procedure TForm1.NextGrid1CellFormating(Sender: TObject; ACol, ARow: Integer; var TextColor: TColor; var FontStyle: TFontStyles; CellState: TCellState); begin if (ACol = 3) and not(csSelected in CellState) then begin TextColor := clRed; FontStyle := [fsBold]; end; end;

See also