views:

317

answers:

1

Hi !

I know that it's possible to add a filter row UNDER the column title because I've seen it done with Coolite. But since I'm a total newbie with Sencha (ExtJS), I have trouble finding how to do it with the ExtJS.grid.GridPanel directly in the script. Would you point me in the right direction with some samples please ?

If possible, I would like to do so without plugins, but if there's one out there doing great and easy to use, I could change my mind.

Thanks !

+1  A: 

Here you have a link to the GridHeaderFilters Plugin. There you have an easy example of how to use it.

And regarding your comment about trying to do this without a plugin I recommend you not to do it. Because this might seem like a easy code to write but I believe it is not. And that is why this plugin has hundreds of lines. I think this is not a plugin full of features that you won't use, this plugin just does the filtering the way you need it.

And as a final note, if you are expecting the exact same behavior as in this coolite example I think you are out of luck. Because if you get the javascript source code of that example and run it through jsbeautifier you will see that this example is not using any ExtJS plugin and is not a easy code as is using a really complex template for the headers.

Protron
Thanks a lot for your answer Proton ! Someone also gave me that hint, so I did try the plugin. Works great, but I'm still having some issues in the context of my project. It loads perfectly (in the Init phase) and then, when the data appears on the Callback, I lose the filters fields. Probably some override (or method injection) somewhere for the onRender,
ultraman69
As for Coolite, we used it (we baught the licence), but decided to go back to ExtJS since we have more fonctionnalities and flexibility with it. I say "we", but I really should say "they" ;-)
ultraman69
"It loads perfectly (in the Init phase) and then, when the data appears on the Callback, I lose the filters fields. Probably some override (or method injection) somewhere for the onRender"I'm having the exact same problem, after the "afterRender" event is fired the filter headers disappear... others are having the same issue but no sign of a fix yet.
DanB
Just found this: http://ww.extjs.com/learn/Extension:FilterRow but appears to have issues with the pagingtoolbar plugin.
DanB
Thanks DanB ! It sure looks promising. But I need it to work with the paging toolbar so... I'll take a closer look at it.
ultraman69
The FilterRow plugin have the same issue than the GridHeaderFilter one. Filters are there in the beggining, then dissapear when the data comes in
ultraman69
Gave up on FilterRow and went back to GridHeaderFilters... definitely dissapearing on loading the grid's store.. I'm stuck as much as you are though.
DanB