J
JN
Hi All,
When an update is made to the gridview, I need to get rid of the current
treeview and repopulate it with the changes.
How do I get rid of the current treeview?
Here is the code that populates the treeview when the page is first loaded.
Sub PopulateNodesSimEx()
Dim dst As DataSet = GetTreeViewData()
Dim masterNode As New TreeNode("SimEx Inc.")
TreeView1.Nodes.Add(masterNode)
For Each childRow As DataRow In dst.Tables("tbDepartmentsSimEx").Rows
Dim childNode As New TreeNode(childRow("SimExDepartment").ToString())
masterNode.ChildNodes.Add(childNode)
For Each childRow1 As DataRow In childRow.GetChildRows("ChildrenSimEx")
Dim childNode1 As New TreeNode(childRow1("FullName").ToString())
childNode.ChildNodes.Add(childNode1)
Next
Next
Thanks.
JN
When an update is made to the gridview, I need to get rid of the current
treeview and repopulate it with the changes.
How do I get rid of the current treeview?
Here is the code that populates the treeview when the page is first loaded.
Sub PopulateNodesSimEx()
Dim dst As DataSet = GetTreeViewData()
Dim masterNode As New TreeNode("SimEx Inc.")
TreeView1.Nodes.Add(masterNode)
For Each childRow As DataRow In dst.Tables("tbDepartmentsSimEx").Rows
Dim childNode As New TreeNode(childRow("SimExDepartment").ToString())
masterNode.ChildNodes.Add(childNode)
For Each childRow1 As DataRow In childRow.GetChildRows("ChildrenSimEx")
Dim childNode1 As New TreeNode(childRow1("FullName").ToString())
childNode.ChildNodes.Add(childNode1)
Next
Next
Thanks.
JN