Assistance Required for Dynamic Table Creation and Data Loading

Dear Support Team,

I am currently working on a project that involves dynamically creating tables and loading data. During this process, I've encountered an error that I've been unable to resolve. To better understand and isolate the issue, I've created a test project replicating the problem.

I'm concerned that there might be some gaps in my understanding or approach regarding this functionality. Your expertise in this matter would be highly valuable. Could you please provide guidance or assistance to help me overcome this challenge?

Thank you for your time and support.

Project:

Best regards.

Change your code to:

procedure TForm1.WebButton1Click(Sender: TObject);
const
  nameArr:array of string = ['name1','name2','name3'];
  ageArr:array of string = ['18','19','20'];
var
  I:integer;
begin
  table:=TWebTableControl.Create('ztTable');
  table.Parent := Self;
  table.HeightPercent:=100;
  table.WidthPercent:=100;
  table.HeightStyle:=ssAuto;

  table.RowCount:=1;
  table.ColCount:=2;
  table.Cells[0,0]:='Name';
  table.Cells[1,0]:='Age';

  for I := 0 to 3 do
  begin
    table.RowCount:=table.RowCount+1;
    table.Cells[0,I]:=nameArr[I];
    table.Cells[1,I]:=ageArr[I];
  end;

end;