Hi,
Since my latest troubles with filtering items in the grid using the RecordFilter I've tried a different approach, namely using a ICollectionView as the data source for the grid and setting the Filter property for it. The filtering now works fine, but the problem is that sorting doesn't work anymore in the grid.
From what I've read if the data source is ICollectionView the grid doesn't do sorting itself anymore but relies on the sorting of the ICollectionView. Is this correct? If so, what would be the recommended approach to do sorting in this case?
I tried subscribing to the Sorting event of the grid and adding the sort description from the event args to the collection view's sort descriptions, but the Sorting event handler is never called. Any ideas why this is?
Thanks
No one has ever bumped into this? Or is there some obvious Infragistics guidance about this topic that I'm missing?...
Hello,
I've attached a small sample with a XamDataGrid bound to a ICollectioView. Initially, the collection is sorted by one property. However, when you click on any of the headers of the XamDataGrid, it sorts by the new field. Please note that the Sorted/Sorting event only fires when the XamDataGrid is being sorted through its UI, not through procedural code.
Hello Alex,
Thanks a lot for the sample. I took a look at it and basically it does what I did in the application. Then I took another look at the application and now sorting is working. So I'm guessing some other team member did something in the meantime...I don't know exactly what unfortunately. The only thing I can think of is that since my post we updated the Infragistics to the latest service release...before we were using the base WPF .NET 2010 Vol1 release. Maybe that's why...
Again, thanks for the sample, all is well, I'll come back if there are any more problems.
Cheers,
Adrian