按照网格列可见的相同顺序访问网格列
我需要按照与网格中显示的顺序相同的顺序访问 infragistics ultragrid 的列。 如果我能够以与网格上可见的相同顺序获取列的索引,我就可以解决我的问题。 提前致谢。
拉利特
I need to access columns of infragistics ultragrid in same sequence in which they are being displayed in grid. If i can get the index of column in same sequence as they are visible on grid, i can fix my issues.
Thanks in advance.
Lalit
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v8.2~Infragistics.Win.UltraWinGrid.UltraGridColumn~GetRelatedVisibleColumn.html
我想您可以尝试处理顺序更改时触发的事件并跟踪所有更改,但这似乎要求出现微妙的错误。
我考虑循环遍历所有列并尝试使用一些属性会告诉我它们当前的位置(也许是 TabOrder?)并使用它来编译列的有序列表。 我想您可能必须使用 Column.GetRelatedVisibleColumn() 方法循环遍历每个列。
我还没有真正实施它,因为我还有其他更优先的问题,但这可能是我最终要走的路。
I suppose you could try to handle the event that is fired when the order is changed and keep track of all the changes, but this seems like it is asking for subtle bugs to creep in.
I considered looping through all the columns and trying to use some property that would tell me their current position (maybe the TabOrder?) and use that to compile an inorder list of the columns. I guess you might have to loop through each colum using the Column.GetRelatedVisibleColumn() method.
I have not actually implemented it yet as I have other higher priority issues but that may be the road I end up going down.
这是一个老问题,但我最近遇到了同样的问题并以这种方式解决了它:
然后您可以使用
columns
按显示顺序访问列。This is an old question, but I recently had same issue and solved it this way:
You can then use
columns
to access columns in order they are shown.