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

Defer Filtering on RadGridView

1 Answer 222 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Charlie
Top achievements
Rank 1
Charlie asked on 23 Aug 2016, 09:09 PM

Hello.

I have a WPF MVVM application with several screens with grids. I currently use FilteringMode="FilterRow" on these grids. The problem I'm having is that after each filter is changed and loses focus, a database trip is made. This is very expensive and slow (going through OData and EF). I would like to defer all filtering until the user clicks a button. I can do this now by not binding a command to the Filtered event, but a change in filter still filters the grid page that currently has focus.

I have done some searching around and I do see that it's not possible to defer filtering when using FilterRow but I would like to explore what options I do have. Popup mode is not an option here as there's too much code to switch out. I saw Custom Filtering as an option but keep in mind that I have lots of grids each with lots of columns (my grid I'm testing with has 56 columns) and I have to be able to apply this across the board.

What I'm ultimately looking for is a way for a user to type their filters into whatever fields they choose and then click 1 button to apply all of them at once. The grid should not update at all when each field loses focus.

Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 26 Aug 2016, 02:01 PM
Hello Charlie,

I'm afraid that the desired behavior cannot be achieved with the current implementation of the control when using the FilterRow FilteringMode.

You could, however, achieve the desired behavior by creating your custom filtering controls and using the Popup FilteringMode and setting the FilteringControl property of each column in RadGridView's Loaded event.

I'm attaching a sample project demonstrating the approach I have in mind. Please have a look at it and let me know whether such an approach would be suitable for you.

Regards,
Dilyan Traykov
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Charlie
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or