Home > Back-end >  How to auto sort datagrid column when binded datatable changes
How to auto sort datagrid column when binded datatable changes

Time:06-25

I'm facing a problem that i don't know how to solve. Maybe someone can throw some light in my path :)

I am developing an WPF application that has a DataGrid binded to a DataTable using MVVM. I have made it this way because i have to manage a list of drivers and the times they are making in slot races and i don't know how many circuits and how many laps they will race at design time so this info is configured inside the application and the DataTable is generated based on it and because of that I need the columns of the datagrid to be autogenerated.

Here is an example of how it sees at the moment.

sorted DataGrid

CodePudding user response:

Finally i managed to find a solution thanks to this other post.

Re-sort WPF DataGrid after bounded Data has changed

Thanks all for your help and for taking your time to look into it :)

  • Related