Feb 11, 2013, 6:18 AM
GridPanel Filters apply state
Hello i wanted to create a little script that saves and loads filters back to grid. I came up with this but it does not do what i'm expecting
function SaveFilter() {
console.log("before");
//filters = Ext.encode(Ext.ComponentManager.get("PlanningGrid").filters.getFilterData());
filters=Ext.ComponentManager.get("PlanningGrid").filters.saveState(Ext.ComponentManager.get("PlanningGrid"), {});
//Ext.Msg.alert('Filters',Ext.encode( filters));
console.log("saved");
}
function LoadFilter() {
//Ext.Msg.alert('Filters', Ext.encode(filters));
Ext.ComponentManager.get("PlanningGrid").filters.applyState(Ext.ComponentManager.get("PlanningGrid"), filters);
console.log("loaded");
}
Can you help thank you!