Good morning everyone. I use the following a code find in this group to check/uncheck the Parent/Children's node of my treeView and work very well.
'------------- this is the code i use to check/uncheck the node ----------------
Private Sub tvTreeView_NodeCheck(ByVal Node As Object)
CheckChildAndGetNextIndex Node, Node.Checked
End Sub
Private Function CheckChildAndGetNextIndex(currentNode As Node, val As Boolean) As Integer
Dim i As Integer
currentNode.Checked = val
CheckChildAndGetNextIndex = currentNode.index + 1
For i = 1 To currentNode.Children
CheckChildAndGetNextIndex = CheckChildAndGetNextIndex(tvTreeView.Nodes(CheckCh ildAndGetNextIndex), val)
Next
End Function
'-------------------------------------------------------------------------------------
My problem now is the following: for all the checked nodes (Parent and Children) I have to do some actions. My idea it was to add the selected nodes in a table and than use the table to do the actions but here is the problem: how to add the selected node text (Parent/Children) in a table (e.g. Table Name TABLE1 field1 NODE) ?
As second problem in case i use a table, I should control also if I'm unchecking the node in order to empty the table in this case.
If this is not the best solution, any other solution you may suggest are welcome if solve the scope.
Thank you for usual and kindly support.