PDA

View Full Version : How to add column in AJAX gridpanel ext.Net on the click of 'Add column' option?



Pranoti
5 Dec 2011, 5:54 AM
How to add column in AJAX gridpanel ext.Net on the click of 'Add column' option?
The grid data is coming from DB.
Please provide the code for the same.

tobiu
5 Dec 2011, 6:50 AM
these are the ext js 4 forums, if your question is not only related to the JS part (clientside) and to ext 4, it might make more sense to use the ext.net forums. at least i am not familiar with their framework & changes they have made.

mitchellsimoens
5 Dec 2011, 6:59 AM
After an Ajax call... you should be able to build a new columns Array and use reconfigure on the grid.

ldonofrio
5 Dec 2011, 10:39 AM
yourGridInstance.headerCt.add({xtype: 'gridcolumn', .......});

mitchellsimoens
5 Dec 2011, 10:54 AM
yourGridInstance.headerCt.add({xtype: 'gridcolumn', .......});

Good luck now with hiding columns. reconfigure needs to be used, not just simply adding it to the headerCt.