Hello!
I'm having a problem using the RadTreeView. I've got a menu divided into a global parent > parent > child.
This means that I've got 3 levels in my treeview. The problem is once I click on the expand button, if it was the first time then there are no issues however if it is the second time or more, the items start to duplicate with each time.
You may watch the recorded video in order to understand what I meant exactly.
1. How to solve the issue with the duplicates? This did not use to happen on the TreeView
2. Is there a way to actually reduce the time it's taking to load the items? As you can see in the video on how it is slow with every click to expand.
Thanks for the help!
Private Sub creaTV(ByVal user As String)
Dim acdo As New SiteWeb.AccesDonnees
Dim rdro As SqlDataReader
RTV_menuUtilisateur.Nodes.Clear()
rdro = acdo.RetournerDataReader("SELECT Identifiant, Libelle FROM lobdjetBDD " _
& "WHERE Parent is null AND NomUser='" & Trim(user) & "' ORDER BY Libelle,Parent", "EU_BREST")
Do While rdro.Read
Dim NewNode As New RadTreeNode(rdro(1), rdro(0))
NewNode.ExpandMode = TreeNodeExpandMode.ServerSide
NewNode.Expanded = False
RTV_menuUtilisateur.Nodes.Add(NewNode)
Loop
rdro.Close()
acdo.Dispose()
End Sub
Protected Sub RTV_menuUtilisateur_NodeExpand(sender As Object, e As RadTreeNodeEventArgs) Handles RTV_menuUtilisateur.NodeExpand
Dim acdo As New SiteWeb.AccesDonnees
Dim rdro As SqlDataReader
Dim user As String
user = DDL_utilisateur_menu.SelectedValue 'this is a combobox with a list of users, ignore it in your tests
rdro = acdo.RetournerDataReader("SELECT Identifiant, Libelle, LienPage FROM lobdjetBDD WHERE Parent = " _
& e.Node.Value & " AND NomUser='" & Trim(user) & "' ORDER BY Libelle,Parent", "EU_BREST")
Do While rdro.Read
Dim NewNode As New RadTreeNode(rdro(1), rdro(0))
NewNode.ExpandMode = TreeNodeExpandMode.ServerSide
e.Node.Nodes.Add(NewNode)
Loop
rdro.Close()
acdo.Dispose()
End Sub