If I bind a RadGridView to a ListCollectionView with a filter, and I chance a value in a Grid cell that causes the filter to return false for that row, I get an exception in the Grid cell.
Code to reproduce:
Steps to reproduce:
1. check one of the checkboxes in the grid
2. move focus to somewhere else
I use version Q3 2011 SP1, .Net 4.0
Is there a way around this problem?
Code to reproduce:
public class MyEntity : INotifyPropertyChanged{ private bool _myBool; public bool MyBool { get { return _myBool; } set { _myBool = value; PropertyChanged(this, new PropertyChangedEventArgs("MyBool")); } } public event PropertyChangedEventHandler PropertyChanged;}public partial class MainWindow { public MainWindow() { InitializeComponent(); DataContext = this; MyEntities = new ObservableCollection<MyEntity> { new MyEntity(), new MyEntity(), new MyEntity() }; MyCv = (ListCollectionView)CollectionViewSource.GetDefaultView(MyEntities); MyCv.Filter = MyBoolFilter; } public ObservableCollection<MyEntity> MyEntities { get; set; } public ListCollectionView MyCv { get; set; } private bool MyBoolFilter(object item) { return !((MyEntity)item).MyBool; } }<Window x:Class="GridViewTest.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525"> <telerik:RadGridView ItemsSource="{Binding MyCv}"/> </Window>Steps to reproduce:
1. check one of the checkboxes in the grid
2. move focus to somewhere else
I use version Q3 2011 SP1, .Net 4.0
Is there a way around this problem?