Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个WPF DatagGrid,用户可以在其中对项目进行排序并重新排序列。
WPF
DatagGrid
现在我想将确切的DataGrid数据复制到重新排序项目和排序列后DataTable显示的数据。DataGrid
DataGrid
DataTable
复制Datagrid.ItemSource到DataTable这里没有帮助。
Datagrid.ItemSource
我绑定DataGrid到一个DataTable通常有 100 列和超过 50 行的,现在我只想将重新排序的数据(由用户UI通过拖动列完成)保存到一个新的单独DataTable中。
UI
一种可能的方法是跟踪用户操作(列拖动、排序)并为数据源构建新的 SQL 查询。