unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    NextGrid61: TNextGrid6;
    NxReportGridView61: TNxReportGridView6;
    NxCheckBoxColumn61: TNxCheckBoxColumn6;
    NxIconColumn61: TNxIconColumn6;
    NxTextColumn61: TNxTextColumn6;
    NxNumberColumn61: TNxNumberColumn6;
    NxGraphicColumn61: TNxGraphicColumn6;
    Button1: TButton;
    ImageList1: TImageList;
    NxProgressColumn61: TNxProgressColumn6;
    NxSlidesGridView61: TNxSlidesGridView6;
    NxSlidesDesigner61: TNxSlidesDesigner6;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    FPhotos: array[0..2] of TJpegImage;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  with NextGrid61.AddRow.Cells do
  begin
    Item[NxCheckBoxColumn61.Index].AsBoolean := True;
    Item[NxIconColumn61.Index].AsInteger := 0;
    Item[NxTextColumn61.Index].AsString := 'Lisa';
    Item[NxNumberColumn61.Index].AsFloat := 40146.44;
    Item[NxGraphicColumn61.Index].Data := FPhotos[0];
    Item[NxProgressColumn61.Index].AsFloat := 23.4;
  end;

  with NextGrid61.AddRow.Cells do
  begin
    Item[NxCheckBoxColumn61.Index].AsBoolean := False;
    Item[NxIconColumn61.Index].AsInteger := 1;
    Item[NxTextColumn61.Index].AsString := 'George';
    Item[NxNumberColumn61.Index].AsFloat := 41341.44;
    Item[NxGraphicColumn61.Index].Data := FPhotos[1];
    Item[NxProgressColumn61.Index].AsFloat := 46.4;
  end;

  with NextGrid61.AddRow.Cells do
  begin
    Item[NxCheckBoxColumn61.Index].AsBoolean := True;
    Item[NxIconColumn61.Index].AsInteger := 2;
    Item[NxTextColumn61.Index].AsString := 'Donald';
    Item[NxNumberColumn61.Index].AsFloat := 45116.44;
    Item[NxGraphicColumn61.Index].Data := FPhotos[2];
    Item[NxProgressColumn61.Index].AsFloat := 53.4;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  NxSlidesDesigner61.Associate := NxSlidesGridView61;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FPhotos[0] := TJPEGImage.Create;
  FPhotos[0].LoadFromFile('photos\flower.jpg');

  FPhotos[1] := TJPEGImage.Create;
  FPhotos[1].LoadFromFile('photos\coast.jpg');

  FPhotos[2] := TJPEGImage.Create;
  FPhotos[2].LoadFromFile('photos\nature.jpg');
end;

end.
