Version

EndCellEdit Method

Ends the current edit mode session on the ActiveCell
Syntax
'Declaration
 
Public Function EndCellEdit( _
   ByVal cancel As Boolean _
) As Boolean
public bool EndCellEdit( 
   bool cancel
)

Parameters

cancel
Specifies whether changes made to the cell's value during the edit mode session should be discarded. Specifying false indicates that the changes should be saved.

Return Value

A boolean indicating whether the current edit mode session was successfully ended.
Example
The following code sample demonstrates how to programmatically exit edit mode using the UltraTreeNode's 'EndCellEdit' method:

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 control.ActiveCell.IsInEditMode Then

            If e.KeyData = Keys.Return Then
                control.ActiveNode.EndCellEdit(False)
            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 )
			{
				if ( e.KeyData == Keys.Return )
					control.ActiveNode.EndCellEdit( false );
			}
		}
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