Hi,
I'm using Prometheus Treeview including the Hotfix dll released yesterday. My code is VB and I'm populating the treeview in the codebehind.
Using an aspx page works just fine. When I move the code to a user control the treeview is empty. No errors, just empty. The user control is loading because I can see treeview in the html sourcecode.
Here are more details if that helps. I'm happy to provide more if needed.
--- aspx codebehind (works) ----
Imports System
Imports System.Data
Imports Telerik.Web.UI
Imports System.Data.SqlClient
Imports System.Configuration
Namespace Telerik.Web.Examples.TreeView.Databinding
Partial Public Class DefaultVB
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
Dim adapter As New SqlDataAdapter("SELECT * FROM tbl_content", System.Configuration.ConfigurationManager.ConnectionStrings("cnstr").ConnectionString)
Dim links As New DataSet()
adapter.Fill(links)
RadTreeView1.DataTextField = "menuTitle"
RadTreeView1.DataFieldID = "id"
RadTreeView1.DataFieldParentID = "parent"
RadTreeView1.DataSource = links
RadTreeView1.DataBind()
End If
End Sub
End Class
End Namespace
--- user control codebehind (does not work) ----
Imports System
Imports System.Data
Imports Telerik.Web.UI
Imports System.Data.SqlClient
Imports System.Configuration
Partial Public Class webadmin_controls_pages_treeview
Inherits System.Web.UI.UserControl
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
Dim adapter As New SqlDataAdapter("SELECT * FROM tbl_content", System.Configuration.ConfigurationManager.ConnectionStrings("cnstr").ConnectionString)
Dim links As New DataSet()
adapter.Fill(links)
RadTreeView1.DataTextField = "menuTitle"
RadTreeView1.DataFieldID = "id"
RadTreeView1.DataFieldParentID = "parent"
RadTreeView1.DataSource = links
RadTreeView1.DataBind()
End If
End Sub
End Class
Again, if I need to provide any more code please let me know.
Thanks for any help,
Joe