wpf DataGridComboBoxColumn GroupStyle
无论如何,是否可以将 groupstyle 设置为 DataGridComboBoxColumn 有任何帮助请
谢谢
Is there anyway to set a groupstyle to DataGridComboBoxColumn
any help please
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您需要为包含
DataGridComboBoxColumn
的DataGrid
设置GroupStyle
。I believe you need to set the
GroupStyle
for theDataGrid
that contains theDataGridComboBoxColumn
.乔恩的答案可以在这里进一步探讨:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6e463473-4cb3-486f-ac2b-c2ee2c844cf4/setting-the-group-style-for- a-datagridcomboboxcolumn?forum=wpf
我认为这实际上不会生成一个包含集合中的组的组合框。我发现的最接近的是:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6edb400e-c29e-4cb9-badc-424fd4b20bef/datagrid -combobox-column-and-grouping-question-using-databinding?forum=wpf
然而,这也是有缺陷的,除非您想覆盖很多功能并对所有功能的当前状态相当细致。我认为没有任何内置方法可以使用组标题在 wpf 中设置 datagridcomboboxcolumn 的样式。
Jon's answer can be further explored here:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6e463473-4cb3-486f-ac2b-c2ee2c844cf4/setting-the-group-style-for-a-datagridcomboboxcolumn?forum=wpf
I don't think this will actually produce a combobox with groups in the collection. The closest I have found is:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6edb400e-c29e-4cb9-badc-424fd4b20bef/datagrid-combobox-column-and-grouping-question-using-databinding?forum=wpf
This however is flawed too unless you want to override a lot of the functionality and be fairly meticulous about the current state of it all. I don't think there is any built in way to style a datagridcomboboxcolumn in wpf with group headers.