Bind Treeview

3 posts, 0 answers
  1. Donovan Kruger
    Donovan Kruger avatar
    5 posts
    Member since:
    May 2010

    Posted 28 May 2010 Link to this post

    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. Donovan Kruger
    Donovan Kruger avatar
    5 posts
    Member since:
    May 2010

    Posted 28 May 2010 Link to this post

    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.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 02 Jun 2010 Link to this post

    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.
Back to Top