PDA

View Full Version : Rebinding Grid from Menu click



Pravin.Pawar
31 Aug 2012, 4:46 AM
Hi,

I have to refresh grid data from the menu click action. Based on menu selection; I want to filter data and rebind grid in ExtJS.

On the page load; I have called .js from where I'm creating grid and binding data with default filter. When I'm fetching new data from Menu click; I do NOT see grid refreshing with new data.

Please let me know how can we rebind grid with new data from Menu click event.

Thanks, Pravin

vdaiev
31 Aug 2012, 6:40 AM
Hi,

All you need to to is just reload a store:


function applyFilter(store) {
store.pageMap.clear(); // if buffered store
var proxy = store.getProxy();
proxy.extraParams['myparam1'] = 'paramvalue';
proxy.extraParams['myparam2'] = 'paramvalue2';
store.load();
}

Pravin.Pawar
1 Sep 2012, 6:21 AM
Not sure how to use... I placed above code somehow it is NOT working.

application throws error at-

store.pageMap.clear(); // if buffered store

Thanks, Pravin

vdaiev
2 Sep 2012, 11:13 PM
First of all check your store name. in my example it's called 'store'.
Second, which version of ExtJs do you use?
If you want place your code sample here and I'll look into it.

- Vladimir

dawesi
2 Sep 2012, 11:29 PM
have you set up remote filtering?


remoteFilter:true