To turn off automatic expansion of nodes, use the Override.AllowAutoDragExpand property.
Imports Infragistics.Win.UltraWinTree Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click ' Note: the Override objects are exposed as properties off ' the tree, the node and the nodes collection as well as ' items in the NodeLevelOverrides collection. This allows ' default settings to be specified for the tree, a node, ' a node's children or for a level in the tree. ' set the number of milliseconds to delay before ' expanding a node during a drag operation Me.ultraTree1.AutoDragExpandDelay = 300 ' Set the default all nodes Me.ultraTree1.Override.AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHoverWhenExpansionIndicatorVisible ' Set the default for nodes that are at level 2 ' (i.e. grandchild nodes of root modes). ' This overrides the default setting above. Me.ultraTree1.NodeLevelOverrides(2).AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHover ' Set the default for nodes at the root level. ' This overrides the default settings above. Me.ultraTree1.Nodes.Override.AllowAutoDragExpand = AllowAutoDragExpand.Never Dim node As UltraTreeNode ' Get a specific node by its key value. ' Note: this will return the node that has that key ' from anywhere in the tree structure since keys are ' unique across the entire tree. node = Me.ultraTree1.GetNodeByKey("child node 1") ' Disallow auto expansion of that specific node only. ' This overrides any default settings above. node.Override.AllowAutoDragExpand = AllowAutoDragExpand.Never ' However, do allow auto expansion of that node's child nodes node.Nodes.Override.AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHover End Sub
using Infragistics.Win.UltraWinTree; private void button2_Click(object sender, System.EventArgs e) { // Note: the Override objects are exposed as properties off // the tree, the node and the nodes collection as well as // items in the NodeLevelOverrides collection. This allows // default settings to be specified for the tree, a node, // a node's children or for a level in the tree. // set the number of milliseconds to delay before // expanding a node during a drag operation this.ultraTree1.AutoDragExpandDelay = 300; // Set the default all nodes this.ultraTree1.Override.AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHoverWhenExpansionIndicatorVisible; // Set the default for nodes that are at level 2 // (i.e. grandchild nodes of root modes). // This overrides the default setting above. this.ultraTree1.NodeLevelOverrides[2].AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHover; // Set the default for nodes at the root level. // This overrides the default settings above. this.ultraTree1.Nodes.Override.AllowAutoDragExpand = AllowAutoDragExpand.Never; // Get a specific node by its key value. // Note: this will return the node that has that key // from anywhere in the tree structure since keys are // unique across the entire tree. UltraTreeNode node = this.ultraTree1.GetNodeByKey("child node 1"); // Disallow auto expansion of that specific node only. // This overrides any default settings above. node.Override.AllowAutoDragExpand = AllowAutoDragExpand.Never; // However, do allow auto expansion of that node's child nodes node.Nodes.Override.AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHover; }
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