I am new to this control ... have done a lot of SQL to Treeview and RadTree but I like what I see in the features etc. here BUT I'm having an awful time getting the nodes to show the details of each item.
A simplified version of my code is below. I am getting something because the tree is poulating with the correct number of nodes and the right 'parent' / 'child' relationship but every node is:
system.data.datarowview
I seem to be populating data to hierarchicalData if I break into it.
I've tried both the dataset and table arguments in the heirarchy gadget ... same result.
I realy want to use this control but I've lost a day and I can't afford another one ... please helpppppp!
Dim dbCon As SqlConnection dbCon = New SqlConnection(ConfigurationManager.ConnectionStrings(\"XXX\").ConnectionString)
Dim cmd_sp As New SqlCommand(\"XXX\", dbCon)
cmd_sp.CommandType = CommandType.StoredProcedure
Dim adapter As SqlDataAdapter = New SqlDataAdapter()
adapter.SelectCommand = cmd_sp
Dim ds As DataSet = New DataSet()
adapter.Fill(ds)
Dim dSet As DataSet = New DataSet
Dim dTable As New DataTable(\"Nodes\")
dSet.Tables.Add(dTable)
dTable.Columns.Add(\"ItemID\")
dTable.Columns.Add(\"ParentID\")
dTable.Columns.Add(\"Name\")
adapter.Fill(dSet)
Dim dbRow As DataRow
For Each dbRow In ds.Tables(0).Rows
dTable.Rows.Add(New Object() {dbRow(\"ItemID\").ToString(), dbRow(\"Parentid\").ToString(), dbRow(\"Name\").ToString()})
Next dbRow
Dim hierarchicalData As IHierarchicalEnumerable = NineRays.WebControls.FlyTreeView.ConvertTabularDataToHierarchical(dTable, \"ItemID\", \"ParentID\")
FlyTree.DataSource = hierarchicalData
FlyTree.DataBind()