Protected Sub flyTreeView_PopulateNodes(ByVal sender As Object, ByVal e As FlyTreeNodeEventArgs)
AddNodes(e.Node.ChildNodes, e.Node.Path)
End Sub
Public Sub AddNodes(ByVal nodes As FlyTreeNodeCollection, ByVal GroupID As Integer)
tblshowgroups.Visible = True
Dim dt As DataTable
dt = cs.Utils.DbHelper.ExecuteDataTable(\"cssp_sit_get_childsites2\", GroupID, 0)
For Each group As DataRow In dt.Rows
Dim ftn As New FlyTreeNode()
ftn.Text = HttpUtility.HtmlEncode(group(\"title\"))
ftn.Value = group(\"site_id\")
flyTreeView.Nodes.Add(ftn)
Try
' do not set populate on demand for nodes that have no nested directories
If group(\"childnodecount\") > 0 Then
ftn.PopulateNodesOnDemand = True
End If
Catch ex As Exception
' add a child node that shows that there was an exception trying to get its child nodes
AddExceptionNode(ftn.ChildNodes, ex)
End Try
Next
End Sub
thanks for your help