Infragistics2.Win.UltraWinGrid.v8.2
AfterCellUpdate Event
See Also  Example
Infragistics.Win.UltraWinGrid Namespace > UltraGrid Class : AfterCellUpdate Event

Occurs after a cell accepts a new value.

Syntax

Visual Basic (Declaration) 
Public Event AfterCellUpdate() As CellEventHandler
C# 
public event CellEventHandler AfterCellUpdate()

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 value has been modified. You can use this reference to access any of the returned cell's properties or methods.

This event is generated when a cell's value has been changed. Note that the cell's new value is not necessarily committed to the data source at this time, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the update occurs. The BeforeRowUpdate event is generated when the new value is to be committed to the data source.

The BeforeCellUpdate event, which is generated before this event, provides an opportunity to prevent the change from occurring.

Example

Following code shows some of the information available in AfterCellUpdate event.

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.

Visual BasicCopy Code
    Imports Infragistics.Shared
    Imports Infragistics.Win
    Imports Infragistics.Win.UltraWinGrid
    Imports System.Diagnostics

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

        ' AfterCellUpdate gets fired after the cell's value has been changed in the UltraGrid.

        System.Diagnostics.Debug.WriteLine("New cell value = " & e.Cell.Value.ToString())

    End Sub
C#Copy Code
       using Infragistics.Shared;
       
using Infragistics.Win;
       
using Infragistics.Win.UltraWinGrid;
       
using System.Diagnostics;

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

           
// AfterCellUpdate gets fired after the cell's value has been changed in the UltraGrid.

           
System.Diagnostics.Debug.WriteLine( "New cell value = " + e.Cell.Value.ToString( ) );

       }

See Also