How to add fields to the grids dynamically?

I want to write a grid which is fully configurable. I want to keep meta data configuration for the grid separate which will be picked optionally based on the logged in user. Please suggest me with the approach.

Thanks,
+Abhishek

http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#method..ListGrid.setFields. Note the comments in that doc about more incremental approaches - in your case, you may find hideField and showField particularly interesting

Note you can also create a DataSource dynamically based on metadata loaded from the server. One way to do so is to load from XML Schema, another is to load an XML file with your own proprietary metadata format, extract various pieces of data from it (eg DataSource.recordsFromXML and various XMLTools APIs) and create a DataSource from that.

Datasource Fields

I wanted to configure DataSource field dynamically based on configuration.

Thanks,
+Abhishek

Yes. So please take a look at the advice above, thanks.

Thanks, got the answer. I have successfully tested creating datasource from a XML schema.