PDA

View Full Version : How to sort items in Ext.grid.NumberColumn by value



napoleonit76
10 Mar 2011, 7:21 PM
Hi,
Is it possible to sort all items in Ext.grid.NumberColumn by their values, not by alphabetical sorting as default?!
Thank you

haiyupeter
10 Mar 2011, 7:58 PM
Mabey you could override the createSortFunction of Ext.data.Store.
Or override the singleSort and multiSort of Ext.data.Store in your page.
like:

Ext.override(Ext.data.Store,{
createSortFunction : function() {
// do something here.
}
});

emils
10 Mar 2011, 10:51 PM
.... or just set a type for the field in your store field set:


fields: [{name:'id'},{name:'code',type:'int'}, ..... ]