Version

ActivateCell Method

Activates the cell that corresponds to the specified UltraTreeNodeColumn. If the cell was successfully activated, true is returned; false is returned otherwise.
Syntax
'Declaration
 
Public Function ActivateCell( _
   ByVal column As UltraTreeNodeColumn _
) As Boolean
public bool ActivateCell( 
   UltraTreeNodeColumn column
)

Parameters

column
The UltraTreeNodeColumn which defines the cell to be activated.

Return Value

A boolean indicating whether the cell was successfully activated.
Remarks

The ActivateCell method causes the cell defined by the specified column to become the ActiveCell. If the ActivateCell method is called on an UltraTreeNode that is not the ActiveNode, that node is first activated. If the BeforeActivate event is canceled, preventing that node from becoming activated, the ActivateCell method will fail and return false. Similarly, if the BeforeCellActivate event is canceled, the ActivateCell method will fail and return false.

Note: The ActivateCell method can be used as an alternative to setting the control's ActiveCell property. Setting the control's ActiveCell property requires that an UltraTreeNodeCell object be created, whereas calling the ActivateCell method does not.

Example
The following code sample demonstrates how to activate and enter edit mode on a cell programatically:

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim node As UltraTreeNode = Me.ultraTree1.Nodes(0)
        Dim column As UltraTreeNodeColumn = node.DataColumnSetResolved.Columns("Address")
        node.BringCellIntoView(column)
        node.ActivateCell(column)
        node.BeginCellEdit(column)
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

		private void button1_Click(object sender, System.EventArgs e)
		{
			UltraTreeNode node = this.ultraTree1.Nodes[0];
			UltraTreeNodeColumn column = node.DataColumnSetResolved.Columns["Address"];
			node.BringCellIntoView( column );
			node.ActivateCell( column );
			node.BeginCellEdit( column );
		}
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