tags:

views:

152

answers:

2

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..

A: 

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

Mchl
thanx.. but dat is also not workin..
kapil
This is what i wrote in my code wenever the store's onload method is called the following gets executed..--> "this.EditorGrid.reconfigure(this.EditorStore, this.EditorColumn);"
kapil
this bug has been boderin me since morning..
kapil
A: 

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);
SBUJOLD
its ok i was able 2 solve the problem.. thanx neways..
kapil
you should post your answer here for people that would have the same issue
SBUJOLD
its not like my code is workin.. i delete my old store and make a new one every time.. d problem is still der so if ne1 finds a solution please help me..
kapil
http://www.sencha.com/forum/showthread.php?53009-Adding-removing-fields-and-columns this site might help many of you..
kapil