PDA

View Full Version : Is there are way to get distinct values in array store?



praveen.jeganathan
18 Feb 2014, 9:49 PM
Hi all,

I'm trying to show distinct values in comboBox, but I couldn't find a way to achieve it. Currently for sorting I'm using sorteres like


var store = Ext.create('Ext.data.ArrayStore', {
fields: ['Names'],
sorters: [{
property: 'Names',
direction: 'asc'
}]
});


Please let me if there is any simple way to do this in ext.js way.

Thank you,
Praveen

Zinnia
19 Feb 2014, 12:42 AM
Please check collect method (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-method-collect).

hope this may help you

praveen.jeganathan
20 Feb 2014, 4:44 AM
Thanks, but I tried to integrate it but it was not working :( It would more helpful if you can direct me with an example.