This is a migrated thread and some comments may be shown as answers.

Disabling the automatic application of filters

2 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 12 Aug 2015, 04:21 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 14 Aug 2015, 02:38 PM
Hello,

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

Regards,
Alexander Popov
Telerik
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
0
Brian
Top achievements
Rank 1
answered on 14 Aug 2015, 05:53 PM
Ah, that's not bad at all. Thank you very much
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Brian
Top achievements
Rank 1
Share this question
or