[CLOSED] paging toolbar loses filter params when paging
i saw this and thought a similar solution may be used for when a page is changed.
http://forums.ext.net/showthread.php...Paging-Toolbar
basically, i am filtering the grid with my own custom filter, then when i refresh the grid, i add the filter info to the store's params...but when i page using the paging toolbar, it uses it's own method to refresh the store, and i cannot add my searchfilters....so i thought i could hijack the pagingtoolbar's "page" eventhandler....any other ideas would be useful also.
this is the premium help section right?
your example doesn't even use baseParams, and it uses a page proxy....this is not helpful at all. Do i need to start a new thread or can someone else provide some insight?
My point is that you are using the built-in baseParams, and the gridfilters plugin. Try this example with a textbox called "myFilter" - when you click enter on this textbox, it filters the grid (pick whatever column you want) by the value in the textbox.
What i have done is load the store specifying the "myFilter" data in the params object. i have yet to see an example where this works using baseParams and setBaseParam.
My code DOES use the paging and sort params, as well as the GridFilters plugin - and these work fine - the above is what i am trying to accomplish, and I HAVE, but it doesn't work with certain events because you have to manually supply the data in the store.load method - and clicking the paging toolbar "next" or "refresh" does not allow you to override that method (or it probably does i just don't know how).
If i can get it to work using baseParams, that's great, but like i said - haven't seen it work...ever.
Thanks Daniil - close it!
Thanks Daniil - i found a solution that works....just not very well documented i guess....setBaseParam doesn't seem to work, but just setting the baseParams to the object like so works (even though the other baseParams that are defined in codebehind aren't specified, they are still passed - which is wierd). This is just quirky - if you specify a baseParam server side, you can't specify that same param client side like this...so in order to get this to work, i had to NOT specify a baseparam server side for "searchFilters"...which again, seems wierd....thanks again!
Code:
function search() {
var grid = Ext.getCmp("GridPanel1");
var store = grid.store;
var pageSize = store.pageSize;
var json = getFilterJson();
store.baseParams = { searchFilters: json };
store.load();
q.focus();
}