Setting the Selected state of a node will automatically update the SelectedNodes collection.
Imports Infragistics.Win.UltraWinTree Private Sub button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button13.Click Dim node As UltraTreeNode node = Me.ultraTree1.ActiveNode If node Is Nothing Then Return ' Toggle the selected state of the active node. node.Selected = Not node.Selected End Sub
using Infragistics.Win.UltraWinTree; private void button13_Click(object sender, System.EventArgs e) { UltraTreeNode node = this.ultraTree1.ActiveNode; if ( node == null ) return; // Toggle the selected state of the active node. node.Selected = !node.Selected; }
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