バージョン

BeforeCellExitEditMode イベント

UltraTreeNodeCell の編集モード セッションが終了する前に発生します。
シンタックス
'宣言
 
Public Event BeforeCellExitEditMode As BeforeCellExitEditModeEventHandler
public event BeforeCellExitEditModeEventHandler BeforeCellExitEditMode
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、BeforeCellExitEditModeEventArgs 型の引数を受け取りました。次の BeforeCellExitEditModeEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
ApplyChanges エンドユーザーが編集モードセッション中に加えた変更を保存するか破棄するかを取得または設定します。
Cancel System.ComponentModel.CancelEventArgsから継承されます。 
Cell Infragistics.Win.UltraWinTree.CancelableCellEventArgsから継承されます。このインスタンスが作成された UltraTreeNodeCell オブジェクトを返します。
Column Infragistics.Win.UltraWinTree.CancelableCellEventArgsから継承されます。このインスタンスが作成された UltraTreeNodeColumn を返します。
Node Infragistics.Win.UltraWinTree.CancelableCellEventArgsから継承されます。このインスタンスが作成された UltraTreeNode を返します。
使用例
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;
				}
			}
		}
参照