unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, NxGridCtrls6, NxGridView6,
  NxColumns6, NxControls6, NxCustomGrid6, NxVirtualGrid6, NxGrid6, Vcl.ImgList, ShellApi;

type
  TForm1 = class(TForm)
    NextGrid61: TNextGrid6;
    NxGridHTMLExport61: TNxGridHTMLExport6;
    Button1: TButton;
    NxReportGridView61: TNxReportGridView6;
    NxTextColumn61: TNxTextColumn6;
    NxNumberColumn61: TNxNumberColumn6;
    NxCheckBoxColumn61: TNxCheckBoxColumn6;
    ImageList1: TImageList;
    NxIconColumn61: TNxIconColumn6;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  FileName: string;
begin
  FileName := ExtractFilePath(ParamStr(0)) + 'output.html';
  NxGridHTMLExport61.SaveToFile(FileName);
  if MessageDlg('Open file in Browser?', mtConfirmation, mbYesNo, 0) = mrYes then
  begin
    ShellExecute(Handle, 'open', PWideChar(FileName), nil, nil, SW_SHOWNORMAL);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  NextGrid61.AddCells([
    'Jim','21212','False','0',
    'Michael','3232','True','1',
    'Anna','3232','True','0',
    'Michele','531','False','1',
    'George','3232','True','1',
    'Susann','567','False','1',
    'Garry','3232','True','0'
  ]
  , [0, 1, 2, 3]);

  NextGrid61.Cell[1, 1].Color := clSkyBlue;
  NextGrid61.Cell[1, 3].Font.Style := [fsBold];
end;

end.
