unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.DBCtrls,
  Data.DB, Datasnap.DBClient, NxColumns6, NxDBColumns6, NxGridView6,
  NxControls6, NxCustomGrid6, NxVirtualGrid6, NxDBGrid6, Vcl.Mask, NxDBCells6;

type
  TForm1 = class(TForm)
    NextDBGrid61: TNextDBGrid6;
    NxReportGridView61: TNxReportGridView6;
    NxDBCheckBoxColumn61: TNxDBCheckBoxColumn6;
    NxDBTextColumn61: TNxDBTextColumn6;
    NxDBNumberColumn61: TNxDBNumberColumn6;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    ClientDataSet1: TClientDataSet;
    ClientDataSet1FirstName: TStringField;
    ClientDataSet1Sallary: TFloatField;
    ClientDataSet1Vacation: TBooleanField;
    DataSource1: TDataSource;
    DBNavigator1: TDBNavigator;
    Button1: TButton;
    CheckBox3: TCheckBox;
    Label1: TLabel;
    Label2: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
    procedure CheckBox3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  NextDBGrid61.AddCells([
    'Mike',
    'Jack',
    'Lisa',
    'Garry',
    'John',
    'Ann',
    'Michael',
    'Lucy',
    'Dona',
    'George',
    'Donald',
    'Bill',
    'Johan',
    'Fredie'
  ], [1]);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  DataSource1.DataSet.Edit;
  NextDBGrid61.SelectedField.Clear;
  DataSource1.DataSet.Post;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  DataSource1.DataSet.Active := TCheckBox(Sender).Checked;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
  NextDBGrid61.BufferRecords := TCheckBox(Sender).Checked;
end;

procedure TForm1.CheckBox3Click(Sender: TObject);
begin
  NextDBGrid61.SelectFullRow := TCheckBox(Sender).Checked;
  NextDBGrid61.MultiSelect := TCheckBox(Sender).Checked;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  CheckBox1.Checked := DataSource1.DataSet.Active;
end;

end.
