Q:

How to dynamically bind a Query to a grid?

I have a Query that the datasources it is set to can change dynamically. I want to take the results of this Query and bind that to a Grid, so each time it may have new fields, and data.
I already added a Grid to my form, and added the Common table as a datasource. I tried to set the dataSource of the grid, and iterate through the fields and dynamically add them, but no data is showing up.

A:

Have a look on the form SysTableBrowser.
It builds the grid based on a tableId.
Maybe you can change SysTableBrowser to accept a query.
Good luck!

