如何以编程方式按多列对 UltraGrid 进行排序?
假设我们有一个 UltraGrid。 我怎样才能以编程方式首先按 A 列排序,然后按 B 列,然后按 C 列排序。
谢谢!
Say we have an UltraGrid.
How can I sort it programmatically first by column A, then B, then C.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此处的文档:
您可以只设置排序指示器(顺序很重要),代码取自上面的链接:
有关第二种方法的更多信息可以在此处找到:
Documentation here:
http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v11.2~Infragistics.Win.UltraWinGrid.UltraGridBand~SortedColumns.html
You can just set the sort indicator (order is important), code taken from above link:
More information on the second method can be found here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v8.2~Infragistics.Win.UltraWinGrid.SortedColumnsCollection~Add.html
如果您还想按 ContactName 自动分组,这可能适合您:
注意使用 true 作为最后一个参数
If you also wanted to automatically group by ContactName this may do it for you:
Notice usage of true as the last parameter