Version

CancelUpdate Method

Cancels pending changes to cell values.
Syntax
'Declaration
 
Public Sub CancelUpdate() 
public void CancelUpdate()
Example
The following code sample demonstrates how to programmatically commit or undo pending cell changes, using the UltraTreeNode's 'Update' and 'CancelUpdate' methods:

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree

    Private Sub ultraTree1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
        Dim control As UltraTree = sender
        If Not control.ActiveCell Is Nothing AndAlso Not control.ActiveCell.IsInEditMode Then

            If (e.KeyData = Keys.F5) Then
				control.ActiveNode.Update()
            ElseIf (e.KeyData = Keys.F6) Then
                control.ActiveNode.CancelUpdate()
            End If
        End If
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;


		private void ultraTree1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			UltraTree control = sender as UltraTree;
			if ( control.ActiveCell != null && control.ActiveCell.IsInEditMode == false )
			{
				if ( e.KeyData == Keys.F5 )
					control.ActiveNode.Update();
				else
				if ( e.KeyData == Keys.F6 )
					control.ActiveNode.CancelUpdate();
			}
		}
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