Reputation: 8234
How do I sort a column programatically ?
I would like to have a function such as
myWPFDataGrid.Columns[0].Sort(..)
MadSeb
Upvotes: 2
Views: 3220
Reputation: 55946
Use an ICollectionView
as your ItemsSource and CollectionViewSource
to generate it. You can set the sort descriptions there and it'll sort your items for you.
Upvotes: 1