ExtJS 4+ data stores allow you to sort data rather easily through either a “sorters” configuration on the store itself, or through the store “sort” method. Only one problem: all sorting is case-sensitive. Here’s a quick example of how you can customize the sorter to be case-insensitive, in a context of a combo box:
{ xtype: 'combo', fieldLabel: 'Supervisor', name: 'manager', queryMode: 'remote', store: Ext.create('Ext.data.Store', { fields: ['displayName', 'distinguishedName'], proxy: Ext.create('T4E.proxy.MSAjaxProxy', { url: '/User/SearchManager', reader: { type: 'json' } }), // eo proxy sorters: [{ property: 'displayName' , transform: function(val) { return val.toLowerCase(); } }] // eo sorters }), // eo store displayField: 'displayName', valueField: 'distinguishedName', forceSelection: true, typeAhead: true, minChars: 1 } |