0
votes

i've made a grid dat can append columns in it dynamically.. the static columns in the grid dont lose their ability to sort in asc or desc order.. but for the dynamically added columns the sort ascending and sort descending optio is not workin.. Need help.. Thanx in advance..

2

2 Answers

1
votes

You might need to call Ext.grid.GridPanel.reconfigure(Ext.data.Store store, Ext.grid.ColumnModel colModel) for grid to use new columnmodel

0
votes

how do you add the column in your grid ? You should post some code.

However, I have used this extension before and got it to work http://www.sencha.com/forum/showthread.php?53009-Adding-removing-fields-and-columns

With this extension in place I was able to do something like this:

grid.addColumn({name:'newstdtimes'}, {header: localizedStrings.newStd, id:'newstdtimes', width: 145, sortable: true, xtype: "numbercolumn", dataIndex: 'newstdtimes'},2);