title: how to remove duplicate nodes from treeview and merge its item to remaining treeNode (VB.net / C#)
body: <p>I want to Remove the duplicate Nodes from a treeview and merge its data into the remaining TreeNode . 
  I am creating a windows application, all components are serverside component</p>
  
  <pre><code>Dim ParentTable As DataTable
       ParentTable = ds.Tables(0)
       Dim parentnode As TreeNode
          parentnode = New TreeNode("Tasks")
                      TreeView1.Nodes.Add(parentnode)
                      Dim MyTasks, Projects, Personal, Team As TreeNode
                      MyTasks = parentnode.Nodes.Add("My Tasks")
                      Projects = parentnode.Nodes.Add("Projects")
                      Personal = parentnode.Nodes.Add("Personal")
                      Team = parentnode.Nodes.Add("Team")
                      Dim Subparentnode As TreeNode
                      Dim childrow As DataRow
                      Dim childnode As TreeNode
  
                      For Each parentrow In ParentTable.Rows
                          Subparentnode = New TreeNode(parentrow.Item(12))
                          MyTasks.Nodes.Add(Subparentnode)
                          childnode = New TreeNode()
                      Next
  
                  For Each parentrow In ParentTable.Rows
                      If (parentrow.Item(3) = 0 And parentrow.Item(4) = 0) Then
                          Subparentnode = New TreeNode(parentrow.Item(12))
                          Personal.Nodes.Add(Subparentnode)
                      End If
  
  
                      If Not (parentrow.Item(3) = 0 And parentrow.Item(4) = 0) Then
                          If Not (parentrow.Item(11) = "") Then
                              Dim isNotExists As Boolean
                              Dim node As New TreeNode
                              Dim SubparentnodeProjectName As TreeNode
                              SubparentnodeProjectName = New TreeNode(parentrow.Item(11))
                                                                                              Projects.Nodes.Add(SubparentnodeProjectName)
                                  Subparentnode = New TreeNode(parentrow.Item(12))
                                  SubparentnodeProjectName.Nodes.Add(Subparentnode)
  
                          End If
                      End If
  
              If (parentrow.Item(3) = 0 And Not parentrow.Item(4) = 0) Then
                  Dim SubparentnodeProjectName As TreeNode
                  SubparentnodeProjectName = New TreeNode(parentrow.Item(17))
                  Team.Nodes.Add(SubparentnodeProjectName)
                  Subparentnode = New TreeNode(parentrow.Item(12))
                  SubparentnodeProjectName.Nodes.Add(Subparentnode)
  
              End If
                  Next
              End If
  </code></pre>
  
  <p>c# code is also acceptable </p>
  
  <p>I have Removed The Duplicate Nodes now but not able to merge the child of the duplicate . Can any body help me ! </p>
  
  <p>Please Provide some Code </p>
  
  <p>Any help is greatly admired</p>
  
  <p>Thanks you</p>
  
  <p>Udit Bhardwaj<img src="https://i.stack.imgur.com/OP1s5.png" alt="Uploaded Image"></p>