如何才能“分组依据”?在 ultrawinggrid 柱上?
控件上会出现一个功能,显示“将列标题拖动到该列的组”。我可以通过编程来做到这一点吗?有什么属性或者我需要嵌入 SQL 语句吗?
谢谢, 太阳
On the control appears a feature saying 'Drag a column header to gorup by that column'. Can i do that programmatically. Are there any properties or do I need to embed SQL statements?
Thanks,
Sun
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要将该列添加到 band 中的 SortedColumns 集合中:
hth
You need to add the column to the SortedColumns collection in the band:
hth
看看这里:
http://forums.infragistics.com/forums/p/2418/15231 .aspx#15231
在这里:
http://forums.infragistics.com/forums/t/5928.aspx
这些行是发挥魔力的行:
grid1.DisplayLayout.ViewType = ViewType.OutlookGroupBy;
grid1.Rows.Band.Columns[0].IsGroupByColumn = true;
grid1.Rows.Band.Expandable = Expandable.Yes;
Take a look here :
http://forums.infragistics.com/forums/p/2418/15231.aspx#15231
and here :
http://forums.infragistics.com/forums/t/5928.aspx
These lines are the one that do the magic :
grid1.DisplayLayout.ViewType = ViewType.OutlookGroupBy;
grid1.Rows.Band.Columns[0].IsGroupByColumn = true;
grid1.Rows.Band.Expandable = Expandable.Yes;
只是想我还要注意,如果你想通过这里清除组,方法如下:
myGrid.Rows.Band.SortedColumns.Clear()
Just thought I'd also note that if you want to clear the group by here is how:
myGrid.Rows.Band.SortedColumns.Clear()