Reputation: 33
I am using EXTJS4. I have a tree which displays classes (classname) on one side. On clicking the class names, I want to be able to display the objects belonging to that class in a separate Grid. The objects will be fetched from the server using ajax and json format. The problem is each class has different number of attributes(columns) so I cannot decide the columns statically. How can I create the grid columns dynamically for each class ? The number of columns will first need to be got from the server.
Thanks
Upvotes: 3
Views: 4912
Reputation: 17860
Absolutely no problem. You don't have to specify everything in the code. ExtJs 4.0 grid has a method reconfigure
which you can use to change store/columns for existing grid. Take a look here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.Panel-method-reconfigure
Upvotes: 2