}
}
+ if (sortUpdated && this.onSortChange)
+ this.onSortChange(this.buildSortList());
+
this.structure[0].cells[0] = displayCells;
this.grid.setStructure(this.structure);
this.grid.update();
- if (sortUpdated && this.onSortChange)
- this.onSortChange(this.buildSortList());
-
if (persist) this.persist(true);
},
return 1;
}
);
+
return sortList.map(function(f){
var dir = f._sort < 0 ? 'desc' : 'asc';
return {field : f.field, direction : dir};
persist : function(noRefresh) {
var list = [];
var autos = [];
- var sort = [];
if (!noRefresh) this.refreshCells();
for(var i = 0; i < this.cells.length; i++) {
if(cell.width == 'auto')
autos.push(cell.field);
}
- if (cell._sort > 0)
- sort.push(cell.field);
}
var setting = {};
setting[this.persistKey] = {
'columns' : list,
'auto' : autos,
- 'sort' : sort
+ 'sort' : this.buildSortList().map(function(f){return f.field})
};
var _this = this;