C# Infragistics UltraGrid 中的单元格值更改会引发哪个事件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/314114/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 22:47:12  来源:igfitidea点击:

Which event raise on cell value change in Infragistics UltraGrid?

c#vb.netwinformsinfragisticsultrawingrid

提问by Nakul Chaudhary

I am using Infragistics UltraGrid in a Windows Forms application.
I need an event which is raised on cell value change.
I've tried many events like AfterCellActivate, AfterCellUpdatebut was unable to find the right one.

我在 Windows 窗体应用程序中使用 Infragistics UltraGrid。
我需要一个在单元格值更改时引发的事件。
我尝试了许多事件,例如AfterCellActivateAfterCellUpdate但无法找到合适的事件。

采纳答案by Kevin Fairchild

AfterCellUpdate is what you want, but you may need to call:

AfterCellUpdate 是你想要的,但你可能需要调用:

  • YourGridControl.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
  • YourGridControl.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExitEditMode)
  • YourGridControl.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
  • YourGridControl.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExitEditMode)

to actually trigger the update, depending on when you want it triggered.

实际触发更新,具体取决于您希望它何时触发。

I've noticed that it can sometimes be finicky on when it'll fire off the event, otherwise.

我注意到它有时会在触发事件时很挑剔,否则。

回答by Vincent Van Den Berghe

AfterCellUpdate should be the right event... Make sure the event is enabled in the EventManager!

AfterCellUpdate 应该是正确的事件...确保在 EventManager 中启用了该事件!

回答by rie819

There is a CellChange event which fires when the user begins to type a value in the cell. This event is useful if you need to know exactly when a cell is modified as the AfterCellUpdate event only fires when the user exits from the cell s/he is changing.

当用户开始在单元格中键入值时会触发 CellChange 事件。如果您需要确切知道单元格何时被修改,则此事件很有用,因为 AfterCellUpdate 事件仅在用户退出他/她正在更改的单元格时触发。