Wednesday, October 10, 2012

Convert PagedCollectionView to Original Source

ObservableCollection<SavedReport> obvColSavedReports = new ObservableCollection<SavedReport>();
                foreach (var savedReport in ((PagedCollectionView)dataGrid1.ItemsSource).SourceCollection)
                {
                    SavedReport sr = (SavedReport)savedReport;
                    if (sr.IsSelected)
                        obvColSavedReports.Add(sr);
                }


See the bold text above? That's it!

No comments:

Post a Comment