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
                End If

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

Query was setup wrong! Got it workin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.