Add urls to dynamically created treeview nodes

4 posts, 0 answers
  1. Stavros
    Stavros avatar
    89 posts
    Member since:
    Sep 2008

    Posted 19 Jun 2009 Link to this post

    I use the hierarchy method to create a treeview with nodes that are created from and underlying database.
    How can I attach urls to the created nodes?
    Thank you very much.
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 19 Jun 2009 Link to this post

    Hello Stavros,

    For that purpose you can use the DataNavigateUrlField property. This is the field name from the data source that populates each Node's NavigateUrlField property during binding.

    Greetings,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Stavros
    Stavros avatar
    89 posts
    Member since:
    Sep 2008

    Posted 19 Jun 2009 Link to this post

    Can I connect these nodes with gridtables?
    I have placed the treeview at the master page and the radGrid is placed in the content page.
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jun 2009 Link to this post

    Hi Stavros,

    I am not sure about your requirement but i suppose that you want to access the selected node of the treeView in the content page. if that is the case, then you can try out the following code:
    c#:
    RadTreeView treeview = (RadTreeView)Master.FindControl("RadTreeView1");  
    string value = treeview.SelectedNode.Value;  

    Thanks
    Shinu.
Back to Top