samedi 3 septembre 2016

extjs - How to filter grid data except selected value in combo box

Ext js has in built function for Grid store called filter and which filter grid result with selected value from combobox.

I want reverse of it. It should filter grid data except selected data.

Example: By default, All combo box are selected at first. When I uncheck any checkbox than grid should be show data except that selected checkbox.

Please find screenshot for filter options

Following is the code which I have tried but it does filter grid with selected checkbox.

var filterArray = [];

filterArray.push({
                   id: 'h2',
                   property: 'vehicle_trafic_light',
                   value: 'Y',     //For Yellow-Ball
                   anyMatch: true,
                   ensitive: false
                 }); 
filterArray.push({
                   id: 'h2',
                   property: 'vehicle_trafic_light',
                   value: 'G',      //For Green-Ball
                   anyMatch: true,
                   ensitive: false
                 });

store.filter(filterArray);

Let me know if anyone have any suggestion for it.




Aucun commentaire:

Enregistrer un commentaire