I am not sure this is related to my previous issue http://es.infragistics.com/community/forums/p/82953/414626.aspx#414626
but i get the same exception if the underlying source is shared between two grids via collectionview. Please see attached.
To fix this remove the following lines from gridview.xaml.cs
grid.FilteringSettings.AllowFiltering = FilterUIType.FilterMenu; grid.FilteringSettings.FilteringScope = FilteringScope.ColumnLayout;
Much appreciate if you could please take this with your development team on a high priority if possible?
Thanks,
Rohit
Sample attached
This surely is a bug in your library. Seems there is an initialization issue, the way i fixed is by checking the collectionchange notification (See attached)
private void DeferAddFilterRow() { if (!DataSource.View.IsEmpty) { AddFilterRow(); return; } DataSource.View.CollectionChanged += DataSourceViewCollectionChanged; }
private void DataSourceViewCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (!DataSource.View.IsEmpty) { DataSource.View.CollectionChanged -= DataSourceViewCollectionChanged; App.Current.Dispatcher.BeginInvoke(new Action(AddFilterRow)); } }
private void AddFilterRow() { grid.FilteringSettings.AllowFiltering = FilterUIType.FilterMenu; grid.FilteringSettings.FilteringScope = FilteringScope.ColumnLayout; }
private CollectionViewSource dataSource; public CollectionViewSource DataSource { get { return dataSource; } set { dataSource = value; var binding = new Binding { Source = value }; BindingOperations.SetBinding(grid, XamGrid.ItemsSourceProperty, binding); DeferAddFilterRow(); } }
The reason i need collectionviewsource is because i want to filter the grid on tab 1 differently from tab 2 i.e. data filter not column filter, i want certain rows to appear in first grid and not in the second (so essentially i am filtering on extra metadata that is not available as part of the underlying data/column). For this i am using collectionviewsource.filter functors
Hello Rohit,
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Hi Yanko,
Sorry but didn't understand what do you mean by "checking your progress"r? This is a showstopper and a bug in your library so i had to remove observable collection since xamgrid does not play nice with observable collection (wasted my week of efforts).
Development issue
14806: Populating empty IEditableCollectionView causes exception when FilterRow is enabled
has been verified by test team and will be released in the next service release.
You will be automatically notified when this is released via the private case CAS-121066-B5D6C5 associated with you initial forum thread (http://es.infragistics.com/community/forums/p/82953/414626.aspx#414626).
Please let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
HI,
This developer issue has been addressed and it's being tested now.
Here a link to our Service Release Schedule:
http://es.infragistics.com/help/service-releases/