View Full Version : How do i get filter item on grid

16 Mar 2015, 6:20 AM
I can use the below code to get a list of Items on my grid.


The items I get are Ascending, Descending and Column. However there is also a string filter item which is not part of the list of items returned.

My question is how do i get the filter item?

16 Mar 2015, 8:28 AM
What about fiddle code?

16 Mar 2015, 9:18 AM

Thanks for responding here is the link for a fiddle, I also included some comments to further explain the issue
Link: https://fiddle.sencha.com/#fiddle/jlr

16 Mar 2015, 9:11 PM
My main motivation for wanted to get the filter item was to update its href tag. In order to achieve this goal I change my approach, instead of getting the item i used inheritance by extending the filter and overwrote the createMenuItem method. The fiddle was updated to show the changes

Ext.define('app.grid.filters.Filters', { extend : 'Ext.grid.filters.Filters',
alias: 'plugin.appGridfilters',
pluginId: 'appGridfilters',

createMenuItem: function (menu, ownerGridId) {
var me = this,
me.sep = menu.add('-');

item = menu.add({
checked: false,
itemId: 'filters',
href : 'javascript:void(0)',
text: me.menuFilterText,
listeners: {
scope: me,
checkchange: me.onCheckChange

return (me.menuItems[ownerGridId] = item);