X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/widgets/grid/GridPanel.js diff --git a/src/widgets/grid/GridPanel.js b/src/widgets/grid/GridPanel.js index b9e2f056..b833f2ee 100644 --- a/src/widgets/grid/GridPanel.js +++ b/src/widgets/grid/GridPanel.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.grid.GridPanel @@ -665,20 +665,21 @@ function(grid, rowIndex, columnIndex, e) { store = this.store, s, c, - oldIndex; + colIndex; if(cs){ for(var i = 0, len = cs.length; i < len; i++){ s = cs[i]; c = cm.getColumnById(s.id); if(c){ - cm.setState(s.id, { + colIndex = cm.getIndexById(s.id); + cm.setState(colIndex, { hidden: s.hidden, - width: s.width + width: s.width, + sortable: s.sortable }); - oldIndex = cm.getIndexById(s.id); - if(oldIndex != i){ - cm.moveColumn(oldIndex, i); + if(colIndex != i){ + cm.moveColumn(colIndex, i); } } } @@ -718,6 +719,9 @@ function(grid, rowIndex, columnIndex, e) { if(c.hidden){ o.columns[i].hidden = true; } + if(c.sortable){ + o.columns[i].sortable = true; + } } if(store){ ss = store.getSortState();