Version

ActiveCell Property

Gets/sets the UltraTreeNodeCell which has the input focus.
Syntax
'Declaration
 
Public Property ActiveCell As UltraTreeNodeCell
public UltraTreeNodeCell ActiveCell {get; set;}
Remarks

As with the ActiveNode property, there can be only one ActiveCell at any given time. The ActiveCell displays a focus rectangle in the user interface to indicate that navigational keyboard actions are performed as relative to that cell.

Note: The ActiveCell by definition must belong to the ActiveNode; setting the ActiveCell property will cause the value of the ActiveNode to change if the new cell belongs to a different node than that referenced by the ActiveNode property.

Note: The UltraTreeNode.ActivateCell method can be used to activate a cell without causing the creation of an UltraTreeNodeCell object.

Example
The following code sample demonstrates how to obtain the value of the ActiveCell:

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If Not Me.ultraTree1.ActiveCell Is Nothing Then
            Dim cellValue As Object
            cellValue = Me.ultraTree1.ActiveCell.Value
            If Not cellValue Is Nothing Then
                Debug.WriteLine(String.Format("ActiveCell.Value = {0}", cellValue.ToString()))
            Else
                Debug.WriteLine("ActiveCell.Value is null.")
            End If
        Else
            Debug.WriteLine("ActiveCell.Value is null.")
        End If

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			if ( this.ultraTree1.ActiveCell != null )
			{
				object cellValue = this.ultraTree1.ActiveCell.Value;

				if ( cellValue != null )
					Debug.WriteLine( string.Format( "ActiveCell.Value = {0}", cellValue.ToString() ) );
				else
					Debug.WriteLine( "ActiveCell.Value is null." );					

			}
			else
				Debug.WriteLine( "ActiveCell.Value is null." );					
		}
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