This is a migrated thread and some comments may be shown as answers.

Bind Treeview

2 Answers 68 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Donovan Kruger
Top achievements
Rank 1
Donovan Kruger asked on 28 May 2010, 08:08 AM
Good day

I would like to know how to create nodes for eg

IT
Financial
Service

And then using sqlDataAdapter and DataTable bind each departments users under those nodes ?

at the moment im using

For Each row As DataRow In ds.Tables("Login").Rows
            Dim tn As New RadTreeNode(row("Username").ToString())
            tn.Name = row("Username").ToString
            UserTreeView.Nodes(0).Nodes.Add(tn)

        Next

Kind Regards
D.Kruger

2 Answers, 1 is accepted

Sort by
0
Donovan Kruger
Top achievements
Rank 1
answered on 28 May 2010, 08:30 AM
Found a long way around.

Just bind a datatable.
loop through datatable and add the relevant Users to their departments.
Under each node index number

so if IT node is (0) then if User Peter is in IT Department then bind his name under that node.

0
Victor
Telerik team
answered on 02 Jun 2010, 05:37 PM
Hi Donovan Kruger,

Thank you for writing.

You simply need to use RadTreeView's data binding to related data capability. You can find a detailed explanation on how it works in this help article.

Write again if you have other questions.

Best wishes,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Treeview
Asked by
Donovan Kruger
Top achievements
Rank 1
Answers by
Donovan Kruger
Top achievements
Rank 1
Victor
Telerik team
Share this question
or