unit GridsForm;
interface
uses
  SysUtils, Types, UITypes, Classes, Variants, FMX_Types, FMX_Controls, FMX_Forms,
  FMX_Dialogs, FMX_Grid, FMX_Layouts, FMX_ExtCtrls, FMX_TabControl, FMX_Ani,
  FMX_Edit;

type
  TfrmGrids = class(TForm)
    Grid1: TGrid;
    StringGrid1: TStringGrid;
    Header1: THeader;
    Column1: TColumn;
    CheckColumn1: TCheckColumn;
    StringColumn1: TStringColumn;
    ProgressColumn1: TProgressColumn;
    PopupColumn1: TPopupColumn;
    ImageColumn1: TImageColumn;
    StringColumn2: TStringColumn;
    StringColumn3: TStringColumn;
    HeaderItem1: THeaderItem;
    HeaderItem2: THeaderItem;
    HeaderItem3: THeaderItem;
    HeaderItem4: THeaderItem;
    TabControl1: TTabControl;
    TabItem1: TTabItem;
    TabItem2: TTabItem;
    TabItem3: TTabItem;
    TabItem4: TTabItem;
    ArcDial1: TArcDial;
    AniIndicator1: TAniIndicator;
    SpeedButton1: TSpeedButton;
    ColorAnimation1: TColorAnimation;
    procedure Grid1GetValue(Sender: TObject; const Col, Row: Integer;
      var Value: Variant);
    procedure Grid1SetValue(Sender: TObject; const Col, Row: Integer;
      const Value: Variant);
    procedure FormCreate(Sender: TObject);
    procedure Column1Click(Sender: TObject);
    procedure StringColumn2Click(Sender: TObject);
    procedure StringGrid1Click(Sender: TObject);
    procedure TabControl1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmGrids: TfrmGrids;

implementation

{$R *.lfm}

procedure TfrmGrids.Column1Click(Sender: TObject);
begin
//
end;

procedure TfrmGrids.FormCreate(Sender: TObject);
var
  col,row: Integer;
  NewColumn: TStringColumn;
begin
  NewColumn := TStringColumn.Create(StringGrid1); // StringGrid1 is the owner
  NewColumn.Parent := StringGrid1;
  NewColumn.Position := TPosition.Create(TPointF.Create(
    StringGrid1.Columns[StringGrid1.ColumnCount-1].Position.X +
    StringGrid1.Columns[StringGrid1.ColumnCount-1].Width, 0));
  NewColumn.Width := 42;
  NewColumn.Height := StringGrid1.Columns[StringGrid1.ColumnCount-1].Height;
  NewColumn.Header := 'NEW';

  Caption := IntToStr(StringGrid1.ColumnCount);
  for Col:=0 to StringGrid1.ColumnCount-1 do
    for Row:=0 to StringGrid1.RowCount-1 do
      StringGrid1.Cells[Col,Row] := Format('%dx%d',[Col,Row]);
  StringGrid1.ScrollTo(0,10);
  Grid1.ScrollTo(0,10);
  StringGrid1.ScrollTo(0,0);
  Grid1.ScrollTo(0,0);
end;

procedure TfrmGrids.Grid1GetValue(Sender: TObject; const Col, Row: Integer;
  var Value: Variant);
begin
  if Col = 1 then Value := Random(100) >= 50 // TCheckColumn
  else
  if Col = 3 then Value := Random(100) // TProgressColumn
  else
  if Col = 4 then
  begin
    case Random(4) of
      0: Value := 'Yes';
      1: Value := 'No';
      2: Value := 'Maybe';
      3: ;
    end;
  end
  else
  if Col <> 5 then
    Value := Format('%dx%d',[Col,Row])
end;

procedure TfrmGrids.Grid1SetValue(Sender: TObject; const Col, Row: Integer;
  const Value: Variant);
begin
  // store values yourself
end;

procedure TfrmGrids.StringColumn2Click(Sender: TObject);
begin
//
end;

procedure TfrmGrids.StringGrid1Click(Sender: TObject);
begin
//
end;

procedure TfrmGrids.TabControl1Change(Sender: TObject);
begin
  Caption := TabControl1.ActiveTab.Text
end;

end.
