I want to sort store (ArrayStore and GroupingStore) alphanumerically and case INSENSITIVELY. I am using singleSort() method but it sorts case sensitively.
For example,
data = ['c', '1', 'A', 'a', 'C']
output = ['1', 'A', 'C', 'a', 'c']
myoutput = ['1', 'a', 'A', 'c', 'C'] or [['1', 'A', 'a', 'C', 'c'] // This is what I want
Any suggestion on how to achieve this?
I found a much simpler way
using ExtJS 3.3.1, probably works with earlier too.
Simply define the sortType for the field as asUCString, like this:
new Ext.data.JsonStore({
url: 'my.php',
fields: [{name:'name', sortType:Ext.data.SortTypes.asUCString}],
sortInfo: { field: 'name', direction: 'ASC'}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With