How to reorder WPF Toolkit datagrid colums programmatically?
-
19-09-2019 - |
Question
My application uses the WPF DataGrid control with custom columns. Although the property Columns is an ObservableCollection<>, the invocation of the method Move does not effect the order of the columns in any way.
Can I somehow reorder the columns of a WPF Toolkit DataGrid programmatically?
Best Regards
Oliver Hanappi
Solution
You can use the DisplayIndex property of a DataGridColumn (use datagrid.Columns to retrieve the columns collection).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow