Hi Guys,
i have found this code in web:
Code:
Private Sub cmdExpandCurrentBranch_Click()
Dim nodThis As MSComctlLib.Node, intIndex As Integer
On Error Resume Next
For Each nodThis In Me.xTree.Nodes ' loop through all nodes
If nodThis.Selected = True Then
intIndex = nodThis.index
cmdExpandBranch nodThis 'Expand branch from selected node on
Exit For
End If
Next nodThis
Me.xTree.SetFocus
Set Me.xTree.SelectedItem = Me.xTree.Nodes.Item(intIndex)
End Sub
Private Sub cmdExpandBranch(ByVal Node As MSComctlLib.Node)
Dim i As Integer
For i = Node.index To Node.Next.index - 1
Me.xTree.Nodes.Item(i).Expanded = True
' Debug.Print Me.xTree.Nodes.Item(i).Text
Next i
End Sub
This code expands all nodes in datasheetview tree.
I would like to expand only one node for the current row in in my table (after afterupdate event).
Did any of you have similar problem maybe ?
Thank you for help,
Jacek Antek