Is CollectionViewSource usable for sorting?
It doesn't complain when it's used, and I see it in Noesis' documents, but it seems sort description doesn't exist.
NoesisException: Unknown type 'System.ComponentModel.SortDescription'.
If not, what can it be used for right now?
NoesisException: Unknown type 'System.ComponentModel.SortDescription'.
If not, what can it be used for right now?
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Is CollectionViewSource usable for sorting?
Sorry but sorting is not implemented in Noesis: https://www.noesisengine.com/bugs/view.php?id=412
Sorting needs to be done in the underlying observable collection.
The best approach could be to sort everything in a new collection and then swap it, so you only notify of a reset change.
Sorting needs to be done in the underlying observable collection.
The best approach could be to sort everything in a new collection and then swap it, so you only notify of a reset change.
Re: Is CollectionViewSource usable for sorting?
Ah, ok. Thanks. I've read that thread, but I was confused that CollectionViewSource didn't throw a not found exception from Noesis, so I didn't know if it could be used for other things.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Is CollectionViewSource usable for sorting?
With current implementation CollectionViewSource can only be used as a wrapper of a Collection.
And provides access to the generated CollectionView.
Code: Select all
<Grid.Resources>
<CollectionViewSource x:Key="people" Source="{Binding People}"/>
</Grid.Resources>
Code: Select all
CollectionView view = people.View;
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 83 guests