Hi,
How do I sort a column programatically ?
I would like to have a function such as
myWPFDataGrid.Columns[0].Sort(..)
MadSeb
From stackoverflow
MadSeb
-
Use an
ICollectionViewas your ItemsSource andCollectionViewSourceto generate it. You can set the sort descriptions there and it'll sort your items for you.karmicpuppet : A link that does this: http://wpf.codeplex.com/Thread/View.aspx?ThreadId=35944Abe Heidebrecht : You don't really need to use it as the ItemsSource. By getting the default collection view, WPF will automatically pick up the sorts you add to it.From Aren
0 comments:
Post a Comment