LABKEY.ext.Store and filters | Ben Bimber | 2012-05-16 19:08 |
Status: Closed | ||
hi leo, the Ext3 LabKey store doesnt provide a convenient public method to dynamically change the filter. as you found, there's a private method where you can set userFilters, which appears expect a similar array as the filterArray you can provide when you create the store. i havent tested this, but it looks like these will get re-applied each time the store loads. because this isnt part of the public API future stability is not guaranteed; however, i think this pattern should work: var store = new LABKEY.ext.Store({....}); store.setUserFilters([LABKEY.Filter.create('myColumn', 'leo', LABKEY.Filter.TYPES.EQUAL)]); //use the same sort of filterArray as with the store itself store.load(); //reload store so filters are applied |
||