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

RadGridView filter issue

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yuriy
Top achievements
Rank 1
Yuriy asked on 16 Jul 2017, 10:43 AM

Hello,

There is an issue when RadGridView does not re-evaluate row item if filter property of viewmodel (datacontext of the row) was changed.

For example, RadGridView contains the FilterDescriptor to display all customers where address property is "Address1". It works fine i.e. RadGridView  shows only customers where address property equals to "Address1. But then I'll change the address property of viewmodel item from "Address1" to "Address2". And I can see this row on GridView. Expected behavior is RadGridView should filter out customer where address property equals to "Address2".

Is here any workaround?

Thank you,

Yuriy.

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 18 Jul 2017, 12:53 PM
Hello,

Currently, RadGridView does not reapply its data operations when a bound item raises PropertyChanged. This is an intended behavior, as forcing SortingGrouping/FIltering is very expensive in terms of performance and it may lead to big bottlenecks in applications that have multiple data updates. However, we have had some client inquiries that suggest adding an alternative mode t hat overrides this behavior. Here is the public feedback item for this request. As a workaround, you can either force collection changed, or edit like stated in the comments:
"By the time being, the data operations can be reapplied either by forcing a CollectionChanged by removing and inserting a given item, or using the approach from the Edit an Item Outside GridView article: http://docs.telerik.com/devtools/wpf/controls/radgridview/managing-data/how-to/edit-item-outside-gridview"
You can also invoke Rebind, but it may be slower than the other alternatives.

Regards,
Ivan Ivanov
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
Yuriy
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or