I am dynamically building a form through x++.
How do I add select records to a grid?
Something like the below statement but not every row of the table. Only rows where somefield == somevalue, for eg.
formBuildGridControl.addDataField(formBuildDatasource.id(), fieldNum(SomeTable, SomeField));
Just Include the below code in your existing Code
formRun = classfactory.formRunClass(args);
fds = formRun.dataSource();
Qbds = fds.query().dataSourceTable(TableNum(SomeTable));
Qbr = Qbds.addRange(fieldnum(SomeTable, SomeField));
Hi, thanks for the answer but it doesn’t seem to be the right way for my problem.
Cause I’ve got like multiple grids and I want each to be populated based on different query of a table/datasource. Am new so am not that sure, but it seems the above solution won’t work in this case?