如何以编程方式对 WPF Toolkit 数据网格列重新排序?

发布于 2024-08-06 14:30:57 字数 187 浏览 2 评论 0原文

我的应用程序使用带有自定义列的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

背叛残局 2024-08-13 14:30:57

You can use the DisplayIndex property of a DataGridColumn (use datagrid.Columns to retrieve the columns collection).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文