0
votes

I have grid in extjs, where in column the value come as 200.00 GB, 12.00 GB, 23.34 GB. When i click on sorting it not shown in proper order like Ascending or decending. Please help me how to show the combination of number and string sorting. Check Image

enter image description here

2
add some code to your question...how does your store look like?CD..
How are you storing the size values? As text that would make sense, however what you really should do is store them numerically and render them as text, that could solve the sort issue.Lloyd
Here is store: Ext.define('temp.store.Device', { extend: 'Ext.data.Store', model: 'temp.model.Device', //autoLoad: true, proxy: { type: 'ajax', url: 'data/role.json', reader: { type: 'json', root: 'dis.role' } } });Hemant

2 Answers

1
votes

This is covered in the documentation: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Field-cfg-sortType

You can provide your own custom sorting method.

0
votes