This is a question that was raised back in 2022 ( How to loop through ALL controls of a form - WEB / TMS WEB Core - TMS Support Center), but is something I haven't needed until now.
The code I have is:
var
I: Integer;
C, S: string;
begin
for I := 0 to AForm.ComponentCount - 1 do
begin
C := AForm.Components[I].ClassName;
S := AForm.Components[I] .Name;
if (AForm.Components[I] is TWebDBComboBox) then
LoadCombo(TWebDBComboBox(AForm.Components[I]));
end;
end;
It picks up the TWebDataSource, TXDataWebDataset, the fields defined in the dataset, TXDataWebClient and that's it. It doesn't pick up any of the visible controls (TWebDBEdit or TWebDBComboBox).
Any ideas on how to do this?
Thanks.