Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Sorting with ICollectionView as data source
posted

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