0

Having some trouble adding children to tree view. All of the parent nodes are created correctly, but it wont add more than 1 child to each parent like it should. It just adds 1 to each parent. Thanks in advance.

For J = 1 To WorkOrdersDataSet.BatchTable.Rows.Count()
            rootnode = workqtree.Nodes.Add(CStr(BatchTableTableAdapter.BatchID(J)))
            For R = 1 To WorkOrdersDataSet.ContainerTable.Rows.Count()
                If (CInt(ContainerTableTableAdapter.BID(R))) = J Then
                    rootnode.Nodes.Add(CStr(ContainerTableTableAdapter.ContainerNm(R)))
                End If
            Next
        Next

BatchID method is returning the name of parent, BID method returns primary key num of parent, and containernm returns name of child

1
Contributor
1
Reply
3
Views
9 Years
Discussion Span
Last Post by cellus205
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.