unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    NextGrid61: TNextGrid6;
    NxReportGridView61: TNxReportGridView6;
    Button1: TButton;
    colPerson: TNxTextColumn6;
    colSalary: TNxNumberColumn6;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  NxCells6;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  NextGrid61.AddCells([
    'Lara', '20000',
    'John', '12000',
    'Joshua', '8000',
    'Michael', '4000',
    'Homer', '200',
    'Daniele', '6900',
    'Owen', '6000',
    'Vallery', '1200',
    'Julian', '6000',
    'George', '900',
    'Ann', '6000',
    'Charlie', '7800',
    'Jeff', '6000',
    'Williams', '2000',
    'Lisa', '6000',
    'Jenny', '6000',
    'Alison', '6000',
    'Benjamin', '6000',
    'Mickey', '4300',
    'Snoopy', '6000',
    'Wiliam', '6000',
    'Jim', '6000',
    'Donald', '6000',
    'Wilson', '6010',
    'Zack', '5000',
    'Phil', '11000'
  ], [0, 1]);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  ResultCells: TNxCells6;
begin
  ResultCells := NextGrid61.QueryCells('colSalary >= 10000 or colSalary <= 20000');

//  ShowMessage(IntToStr(ResultCells.RowCount));

end;

end.
