Reputation: 1258
I want to use checkboxes in extjs to filter a grid. This is my checkbox
xtype: 'checkboxfield',
id: 'cb1',
boxLabel: 'Online',
checked: true,
handler: function (field, value) { }
xtype: 'checkboxfield',
id: 'cb2',
boxLabel: 'offline',
checked: true,
handler: function (field, value) { }
What i want is that when i select it it will filter my store. It should tell the store to show the online records and/or the offline records.
i read something about the Boolean filters so maybe that is something to use but i can't find out how.
Upvotes: 1
Views: 2264
Reputation: 1333
use your store's filter method on your handler like
handler: function (field, value) {
store.filter('online', value);
}
Upvotes: 2