如何以编程方式对 WPF Toolkit 数据网格列重新排序?
我的应用程序使用带有自定义列的 WPF DataGrid 控件。尽管属性 Columns 是 ObservableCollection<>,但 Move 方法的调用不会以任何方式影响列的顺序。
我可以以某种方式以编程方式重新排序 WPF Toolkit DataGrid 的列吗?
最好的问候
奥利弗·哈纳皮
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 DisplayIndex< /a> DataGridColumn 的属性(使用 datagrid.Columns 检索列集合)。
You can use the DisplayIndex property of a DataGridColumn (use datagrid.Columns to retrieve the columns collection).