PDA

View Full Version : ExtJS 4.0.7 Grid filtering



harman
10 Aug 2012, 7:46 AM
HI,

I am using Extjs 4.0.7 Grid.
I want to put a filter on a column.
Can anyone put a sample code for the same as i am not able to find any plugin for that.

Thanks

scottmartin
10 Aug 2012, 10:59 AM
How do you want to filter the grid?
edit/Button, column editor at top of each column, menu selection?

Scott.

luisparada
11 Aug 2012, 8:35 AM
Here is a very basic and small filter, I hope you can use it and learn how to do more complex filters.


listeners:{
change:function(el,rec,oldrec){
var panel = Ext.getCmp('showTrackingLogs-id');
panel.getStore().filter([{
property:'descripcion',
value:rec
}]);
if(rec==""){
panel.getStore().clearFilter();
}
}
}

harman
13 Aug 2012, 1:24 AM
Hi Scott,

I wanted a filter (on string) under the menu items of a specific column header as shown on the sample and demos page of Sencha. Just that i will put a dropdown in place of textfield under submenu of filter.
The problem is that i indirectly refer the Library of ExtJS rather than having it all in my proj.
And i am unable to find the 'Ext.ux.grid.FiltersFeature'.

scottmartin
13 Aug 2012, 6:12 AM
examples/ux/grid/FiltersFeature.js

Scott.