简体   繁体   English

DevExpress Winforms XtraGrid - 在单行/行中显示组

[英]DevExpress Winforms XtraGrid - Show groups in a single row/line

I have a grid where users group by multiple columns.我有一个网格,用户按多列分组。 The issue is, due to the way DevExpress grid displays multiple group columns, the group panel height grows with each grouped column.问题是,由于 DevExpress 网格显示多个组列的方式,组面板高度随着每个分组列而增长。 This is because the group panel shows grouped columns in a tree like view.这是因为组面板在树状视图中显示分组的列。

Is it possible to display all the grouped columns in a single line/row in the group panel?是否可以在组面板的单行/行中显示所有分组的列?

You can set the GridView's OptionsView.ShowGroupPanelColumnsAsSingleRow property to True to achieve this behavior.您可以将GridView 的 OptionsView.ShowGroupPanelColumnsAsSingleRow 属性设置为True以实现此行为。 It is False by default.默认为 False。

在此处输入图像描述

  1. You can use grammatically set group by function may be it can help you.您可以使用 function 的语法设置组,它可能会对您有所帮助。

Try it:试试看:

gridView1.Columns["Column"].GroupIndex = 0; gridView1.Columns["Column"].GroupIndex = 0;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM