'Declaration Public Event BeforeCellExitEditMode As BeforeCellExitEditModeEventHandler
public event BeforeCellExitEditModeEventHandler BeforeCellExitEditMode
The event handler receives an argument of type BeforeCellExitEditModeEventArgs containing data related to this event. The following BeforeCellExitEditModeEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ApplyChanges | Gets/sets whether changes made by the end user during the edit mode session are saved or discarded. |
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
Cell (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNodeCell object for which this instance was created. |
Column (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNodeColumn for which this instance was created. |
Node (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNode for which this instance was created. |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTree Private Sub ultraTree1_BeforeCellExitEditMode(ByVal sender As Object, ByVal e As BeforeCellExitEditModeEventArgs) Handles ultraTree1.BeforeCellExitEditMode If e.ApplyChanges = False Then Dim cellValue As Object = e.Cell.Value Dim editorValue As Object = IIf(e.Cell.EditorResolved.IsValid, e.Cell.EditorResolved.Value, Nothing) If Object.Equals(cellValue, editorValue) = False Then Dim result As DialogResult = MessageBox.Show("The cell's contents have changed. Are you sure you want to discard changes?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Stop) If (result = DialogResult.No) Then e.Cancel = True End If End If End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTree; using System.Diagnostics; private void ultraTree1_BeforeCellExitEditMode(object sender, Infragistics.Win.UltraWinTree.BeforeCellExitEditModeEventArgs e) { if ( e.ApplyChanges == false ) { object cellValue = e.Cell.Value; object editorValue = e.Cell.EditorResolved.IsValid ? e.Cell.EditorResolved.Value : null; if ( object.Equals(cellValue, editorValue) == false ) { DialogResult result = MessageBox.Show( "The cell's contents have changed. Are you sure you want to discard changes?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Stop ); if ( result == DialogResult.No ) e.Cancel = true; } } }
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