unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    NextGrid61: TNextGrid6;
    NxReportGridView61: TNxReportGridView6;
    NxTextColumn61: TNxTextColumn6;
    NxNumberColumn61: TNxNumberColumn6;
    ListBox1: TListBox;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    procedure NextGrid61BeforeSelect(Sender: TObject; var ACol, ARow: Integer;
      Key: Word; Shift: TShiftState);
    procedure NextGrid61Select(Sender: TObject; ACol, ARow: Integer);
    procedure NextGrid61SelectionChanged(Sender: TObject; ACol, ARow: Integer);
    procedure NextGrid61SelectQuery(Sender: TObject; ACol, ARow: Integer;
      var Accept: Boolean);
    procedure FormCreate(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  NextGrid61.MultiSelect := CheckBox1.Checked;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
  NextGrid61.SelectFullRow := CheckBox2.Checked;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  NextGrid61.AddCells(['Jim', '23', 'Anna', '12'], [0, 1]);
end;

procedure TForm1.NextGrid61BeforeSelect(Sender: TObject; var ACol,
  ARow: Integer; Key: Word; Shift: TShiftState);
begin
  ListBox1.Items.Add('OnBeforeSelect');
end;

procedure TForm1.NextGrid61Select(Sender: TObject; ACol, ARow: Integer);
begin
  ListBox1.Items.Add(Format('OnSelect SelectedCount:%d', [NextGrid61.SelectedCount]));
end;

procedure TForm1.NextGrid61SelectionChanged(Sender: TObject; ACol,
  ARow: Integer);
begin
  ListBox1.Items.Add('OnSelectionChanged');
end;

procedure TForm1.NextGrid61SelectQuery(Sender: TObject; ACol, ARow: Integer;
  var Accept: Boolean);
begin
  ListBox1.Items.Add('OnSelectQuery');
end;

end.
