unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    NextGrid1: TNextGrid;
    NxTextColumn1: TNxTextColumn;
    NxTextColumn2: TNxTextColumn;
    edtFilter: TNxEdit;
    Label1: TLabel;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure edtFilterChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  Names: Array[0..16] of string = ('Jim', 'Jack', 'Craig', 'Lora', 'Jenna',
    'Marry', 'Susan', 'Mike', 'Craig', 'Michael', 'Johny', 'Phill', 'Jerry',
    'Dona', 'Claudia', 'John', 'Donovan');

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  NextGrid1.AddRow(100);
  for i := 0 to NextGrid1.RowCount - 1 do
  begin
    NextGrid1.Cell[0, i].AsString := Names[Random(Length(Names))];
    NextGrid1.Cell[1, i].AsString := Names[Random(Length(Names))];
  end;
end;

procedure TForm1.edtFilterChange(Sender: TObject);
var
  i: Integer;
  s: string;
  RowVisible: Boolean;
begin
  for i := 0 to NextGrid1.RowCount - 1 do
  begin
    s := UpperCase(edtFilter.Text);
    RowVisible := (s = '') or (Pos(s, UpperCase(NextGrid1.Cell[0, i].AsString)) > 0);
    NextGrid1.RowVisible[i] := RowVisible;
  end;
end;

end.
