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

Handling filter by my own

3 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ahmad
Top achievements
Rank 1
Ahmad asked on 18 Oct 2016, 07:52 AM
Hi,
In my project, I can't set all data in ItemsSource.
I want when user filter, I set data to ItemsSource(note: I don't want Telerik to filter current data).

I handle the Filtered event and I set My data to ItemsSource in this function. but Telerik filters new data again.
What am I do to force Telerik don't filtering data by itself?
thanks.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 19 Oct 2016, 02:19 PM
Hi Ahmad,

The Filtered event of RadGridView is triggered when the filtering operation has already been processed. Thus, handling it cannot cancel the filtering that the user has performed through the UI. This data operation can be canceled by subscribing to the Filtering event of the control and setting the Cancel property of the event arguments to true. More information can be found in the Event Model topic. Note, that with such approach the control will also behave as not being filtered, as if the FilteringControl is not working at all. I am afraid, that the control cannot be forced to visually behave as filtered, without the actual data operation to be processed.

The other solutions for disabling the filtering of RadGridView are described in the Disable Filtering for a Specific Column and Disable Filtering for the Entire Grid help topics.

For such requirement, I suggest you trying to implement a Custom Filtering Control. You may also find the Custom Filtering Control SDK Example useful. It can be reviewed through the SDK Samples Browser.

Hope this helps.

Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
0
Dmitri
Top achievements
Rank 1
answered on 02 Apr 2018, 08:59 PM
This is unacceptable. I want to use filtering UI but I don't want RadGridView to do actual filtering. How hard can it be?
0
Stefan
Telerik team
answered on 04 Apr 2018, 04:02 PM
Hi Dmitri,

I can confirm that having the grid visually appearing as filtered but without having the actual data operation applied would not be possible. The control is not designed to be used in such manner. Please, refer to my previous reply for the possible approaches for canceling the filtering.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Ahmad
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Dmitri
Top achievements
Rank 1
Share this question
or