Results 1 to 2 of 2

Thread: How to apply multiple filters during load?

  1. #1

    Default Answered: How to apply multiple filters during load?

    I have a grid that refreshes after a user updates rows with a button click function. When the update happens, I am able to get the current filters with:

    Code:
    var activeFilters = prePayLeadViewUpdateStatus.down('gridpanel').store.getFilters(false);
    Which gives me an array of the currently set filters. Now, how do I reapply to those filters back to the gridStore after this:

    Code:
    gridStore.removeAll();
                gridStore.loadData(gridData.data);
    How do you load an array of filters?

    Thanks!

  2. Hi,

    According to the documentation, method getFilters() returns Ext.util.FilterCollection. I think that you can reassign your filters using:
    Code:
    gridStore.setFilters(activeFilters.items)
    I didn't try it but hope it works

    You can check the docs here: https://docs.sencha.com/extjs/6.5.1/...ml#cfg-filters

    Regards,
    Maciej

  3. #2
    Sencha Premium User
    Join Date
    Jul 2017
    Posts
    15
    Answers
    1

    Default

    Hi,

    According to the documentation, method getFilters() returns Ext.util.FilterCollection. I think that you can reassign your filters using:
    Code:
    gridStore.setFilters(activeFilters.items)
    I didn't try it but hope it works

    You can check the docs here: https://docs.sencha.com/extjs/6.5.1/...ml#cfg-filters

    Regards,
    Maciej

Similar Threads

  1. How to apply the grid filters correctly?
    By agunescu in forum Sencha Ext JS Q&A
    Replies: 3
    Last Post: 31 Jan 2017, 1:36 AM
  2. Apply multiple filters in the same store
    By PabloPerezAdsuar in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 12 May 2013, 6:27 AM
  3. Replies: 2
    Last Post: 24 Oct 2012, 11:48 AM
  4. Replies: 1
    Last Post: 10 Sep 2012, 11:05 AM
  5. How to apply two filters progressively?
    By sravaniv in forum Ext: Q&A
    Replies: 2
    Last Post: 20 Jan 2012, 12:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •