在 Infragistics Ultragrid Winforms 上显示行数
显示 UltraGrid 绑定的行数的最佳方式是什么?
我希望能够做到, this.UltraGrid.DataSource = myCustomObject;
并且,网格应显示数据以及行数。
我尝试编写一个带有超级网格和状态栏的自定义控件。 当“InitializeRow”事件被触发时,用 rowCount 更新状态栏。 这会给我我想要的东西,但是效率很低。
我尝试过其他事件,例如“InitializeLayout”、“InitializeRowsCollection”、“Enter”事件,但是当数据源更改时,这些事件不会被触发。
建议?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了一种更好的方法来做到这一点,即使用 ultragrid 的 SummaryDisplayArea 功能。
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v11.1~Infragistics.Win.UltraWinGrid.UltraGridOverride~SummaryDisplayArea。 html
在 InitializeLayout 事件中我有类似的东西
I found a better way to do this by using SummaryDisplayArea feature of ultragrid.
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v11.1~Infragistics.Win.UltraWinGrid.UltraGridOverride~SummaryDisplayArea.html
On InitializeLayout event I have something like this
如果您使用
BindingSource
,您可能会喜欢 绑定导航器。您可以将其从工具箱(数据选项卡)拖到表单上并设置其
BindingSource
属性。如果您愿意,您可以简单地删除添加和删除按钮,这使得它看起来像这样:If you use a
BindingSource
you may like the BindingNavigator.You can drag it on your form from the Toolbox (data tab) and set its
BindingSource
property. You can simply remove the add and delete buttons if you wish, which makes it look like this: