XtraGrid 单元格分组
我在我的应用程序中使用 XtraGrid。我想将一些单元格分组在一起并用组名称替换它们。以下是说明。
在上面的图像中,我从第一列中选择了几个单元格。现在,当我单击“组”时,从上下文菜单中,我将弹出一个组名称对话框。现在问题就在这里了。
我想用组名称逻辑替换单元格包含的内容。因此,在网格中,对于第一列的选定单元格,但在查看时它应该显示为单个单元格。我尝试过 xtragrid 的单元格合并功能,但这会破坏行选择功能。如何执行此操作?
上面显示的网格是有界网格,所以如果我尝试对整数类型的列进行分组,那么如何替换整数列中的字符串组名称?这在网格中可能吗?
我可以在有界网格中添加无界列吗?
请帮忙。
谢谢, 奥姆基
I am using XtraGrid in my app. I want to group some cells togethere and replace them with group name. Following is the description.
I above image I have selected few cells from First columns. Now, from context menu when I will click on "Group", I will popup up a dialog for group name. Now here onwards the problem is.
I want to replace the cell containts logically with the group name. So in grid, for first column's selected cells, but while viweing it should appear as single cell. I have tried the cell merging feature of the xtragrid but that disbales the row selection feature. How to do this?
The grid shown above is bounded grid, so if I tried to do grouping for lets say Integer type of column, then how can I replace the group name which is string in integer column? is this possible in grid?
Can I add the unbounded column in bounded grid?
Please help.
Thanks,
Omky
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题已经有 4 年历史了,但是对于那些用 google 搜索过这个问题并有相同问题的人,您可以尝试以下操作:
Column1 .OptionsColumn.AllowMerge
为 true。您可以使用视图CellMerge
事件影响合并行为。由于在合并单元格的情况下没有连续行,因此无法使用行选择。
Column1.Group()
。要指定用于比较的值,您可以将Column1.GroupInterval
指定为Value
或DisplayText
。可以使用CustomColumnDisplayText
事件自定义单元格 DisplayText。带状网格视图。你为什么要这样做?
一般来说,您可以联系 DevExpress 提供快速且合格的支持。
The question is 4 years old, but for those who googled this and have the same questions, you could try this:
Column1.OptionsColumn.AllowMerge
to true. You can influence the merging behaviour using the ViewsCellMerge
Event. As you do not have a continouos row in case of a merged cell, you cannot useRowSelect.
Column1.Group()
. To specify the value wich is taken for comparison you can specify theColumn1.GroupInterval
to e.g.Value
orDisplayText
. The Cells DisplayText can be customized using theCustomColumnDisplayText
event.BandedgridView. Why would you want to do this?
Generally there is a fast and qualified support at DevExpress you can contact.