unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, NxAutoCompletion, StdCtrls, NxScrollControl,
  NxCustomGridControl, NxCustomGrid, NxGrid, NxColumns, NxColumnClasses,
  NxEdit;

type
  TForm1 = class(TForm)
    NextGrid1: TNextGrid;
    NxTextColumn1: TNxTextColumn;
    Button2: TButton;
    NxTextColumn2: TNxNumberColumn;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  NextGrid1.AddCells(['Mike', '2253', 'Jack', '115.321', 'Lisa', '0']);
  NextGrid1.CalculateFooter;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Caption := IntToStr(NextGrid1.LastVisibleRow)
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  NextGrid1.SaveToHtml('test.htm', [hsCreateStyleSheet, hsSaveFooter, hsSaveCaption, hsSaveHeaders]);
(*
  Example:
  --------
  Add next code into test_style.css file

  td.salary {
    text-align: right;
    background-color: #99FF99;
  }
*)
end;

end.
