Version

AfterCellCancelUpdate Event

Occurs after the user cancels changes to a cell's value by pressing the ESC key.
Syntax
'Declaration
 
Public Event AfterCellCancelUpdate As CellEventHandler
public event CellEventHandler AfterCellCancelUpdate
Event Data

The event handler receives an argument of type CellEventArgs containing data related to this event. The following CellEventArgs properties provide information specific to this event.

PropertyDescription
Cell Returns a reference to the cell of interest.
Remarks

The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose update was canceled. You can use this reference to access any of the returned cell's properties or methods.

This event is generated after the user presses the ESC key to cancel changes made to a cell's value. It is not generated when the CancelUpdate method is invoked.

The BeforeCellCancelUpdate event, which occurs before a cell's update is canceled, is generated before this event.

Example
Follwoing code illustrates an usage of AfterCellCancelUpdate event which gets fired when the user cancels cell update by hitting Escape key.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub UltraGrid1_AfterCellCancelUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ultraGrid1.AfterCellCancelUpdate

       ' AfterCellCancelUpdate gets called when the user cancels a cell update by hitting
       ' Escape key when in edit mode.

       Debug.WriteLine("User has just canceled updating the cell. Band = " & e.Cell.Row.Band.Key & ", Column = " & e.Cell.Column.Key)

   End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void ultraGrid1_AfterCellCancelUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{

	// AfterCellCancelUpdate gets called when the user cancels a cell update by hitting
	// Escape key when in edit mode.

	Debug.WriteLine( "User has just canceled updating the cell. Band = " + e.Cell.Row.Band.Key + ", Column = " + e.Cell.Column.Key );

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also