Infragistics UltraGrid 中复选框的选中更改会引发哪个事件?

发布于 2024-07-08 16:40:03 字数 98 浏览 20 评论 0原文

我在 WinForms 应用程序中使用 Infragistics UltraGrid。
Infragistics UltraGrid 中复选框的“检查更改”会引发哪个事件?

I am using an Infragistics UltraGrid in a WinForms application.
Which event is raised on "check change" of checkbox in Infragistics UltraGrid?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

对你的占有欲 2024-07-15 16:40:03

使用 CellChange 事件引发 UltraGrid.PerformAction(UltraGridAction.ExitEditMode) 事件。 这将触发 AfterCellUpdate 事件。

Use the CellChange event to raise the UltraGrid.PerformAction(UltraGridAction.ExitEditMode) event. This will fire the AfterCellUpdate event.

任性一次 2024-07-15 16:40:03

您需要使用复选框的 AfterUpdate 事件。

不过,如果您无法触发它,请尝试添加以下内容:

Private Sub YourGridcontrol_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles YourGridcontrol.MouseDown
    YourGridcontrol.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
End Sub

Private Sub YourGridcontrol_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles YourGridcontrol.MouseUp
    YourGridcontrol.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExitEditMode)
End Sub

默认情况下,仅切换复选框似乎不会触发更新。 通过使其进入/退出编辑模式,AfterUpdate 应该按照您的需要工作。

更新:或者,就像文森特建议的那样,对 CellChange 事件执行 PerformAction 也应该有效。 要点是一样的。

The AfterUpdate event of the checkbox is what you'll want to use.

If you're not able to trigger it, though, try adding this as well:

Private Sub YourGridcontrol_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles YourGridcontrol.MouseDown
    YourGridcontrol.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
End Sub

Private Sub YourGridcontrol_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles YourGridcontrol.MouseUp
    YourGridcontrol.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExitEditMode)
End Sub

By default, just toggling the checkbox doesn't seem to trigger an Update. By making it enter/exit edit mode, the AfterUpdate should work as you want.

UPDATE: Or, like Vincent suggested, doing the PerformAction on the CellChange event should work, too. The gist is the same.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文