GridPanel Filters apply state

  1. #1

    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!
  2. #2
    Hello!

    Can you provide full and simplified example of your code?
  3. #3

    Workaround found

    I managed to solve this by not refreshing the whole page and to loose all the filters.
    But by using
    Ext.ComponentManager.get("PlanningGrid").store.load();
    So this way the data is refreshed but the filters are kept.

Similar Threads

  1. Can I save and after that Reload the filters state in Ext.NET Grid view
    By Nhím Hổ Báo in forum 1.x Help
    Replies: 14
    Last Post: Mar 26, 2015, 10:22 AM
  2. [CLOSED] How can I apply filters on TriggerField
    By gets_gui in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 06, 2012, 3:52 PM
  3. Replies: 3
    Last Post: Jan 12, 2012, 3:26 PM
  4. [CLOSED] GridPanel: apply css on column
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 24, 2010, 8:53 PM
  5. [CLOSED] [1.0] EditableGrid Apply to selection apply to all
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 24, 2010, 5:49 PM

Tags for this Thread

Posting Permissions