Disabling the automatic application of filters

3 posts, 1 answers
  1. Brian
    Brian avatar
    2 posts
    Member since:
    Jul 2015

    Posted 12 Aug 2015 Link to this post

    I have very large data sets I want to display in a grid, and I'd like to use the auto filtering on the column header.  But with my large data sets, users will typically want to specify a few filters before getting their data, otherwise the retrieval of the records from the database takes a very long time.

    It seems that by default, each filter in the grid is applied immediately.  I'd like to allow the user to select multiple filters, and then push a button to trigger the refresh.

    Is there a good way to skip the automatic refresh that comes with setting a filter in the grid header?


  2. Answer
    Alexander Popov
    Alexander Popov avatar
    1443 posts

    Posted 14 Aug 2015 Link to this post


    This is not supported out of the box, however you could achieve similar results using a custom solution. For example: 
    • Subscribe to the DataSource's requestStart event
    • Create a button that once clicked calls the DataSource's read method
    • Before calling the read, check the number of applied filters. If more than, let say three, raise a flag
    • Check the flag in the requestStart event handler and if it is not raised - call the e.preventDefault method. This will prevent the DataSource from issuing a request

    Alexander Popov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Brian
    Brian avatar
    2 posts
    Member since:
    Jul 2015

    Posted 14 Aug 2015 in reply to Alexander Popov Link to this post

    Ah, that's not bad at all. Thank you very much
Back to Top