procedure TIWForm2.IWAppForm32Create(Sender: TObject);
var i: integer;
begin
iwgrid321.cell[0,0].text := 'Name';
iwgrid321.cell[0,1].text := 'Geburtstag';
iwgrid321.cell[0,2].text := 'Ändern';
table1.Open;
table1.First;
iwgrid321.RowCount:=table1.RecordCount+1;
for i := 1 to table1.RecordCount do begin
iwgrid321.cell[i,0].text := table1.fieldbyname('Name').asstring;
with iwgrid321.Cell[i,1] do begin //editfeld
Control:=TIWEdit32.Create(self);
with TIWEdit32(Control) do begin
Text:=table1.fieldbyname('Geburtstag').asstring;
end;
end;
with iwgrid321.Cell[i,2] do begin //button
Control:=TIWButton32.Create(self);
with TIWButton32(Control) do begin
Text:='Ändern';
onclick:=testprozedur; //
sql-Anweisung
end;
end;
table1.Next;
end;
table1.Close;
end;