save radtreeview selected node

4 posts, 0 answers
  1. Iam
    Iam avatar
    3 posts
    Member since:
    Dec 2012

    Posted 12 Dec 2012 Link to this post

    hi.

    i have taken a master page and a webform. and given radtreeview in masterpage. when select a node of radtreeview, i need to open the redirected page in right side panel. that i am succeeded with..
    when i click on node, the redirected page is opened in the right panel .but the radtreeview is collapsed again.
    what my problem is..
    i need to keep the expanded tree as it is after the redirected page is opened in the right panel.

    my code is as follows:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;


    public partial class MASTERS_EPM0001 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string p_node_value;
            p_node_value = Session["p_node_value"].ToString();
            RadTreeView1.Nodes.FindNodeByValue(p_node_value);
            RadTreeView1.SelectedNodes.v = p_node_value;
            EPM0001LBL1.Text = p_node_value;
        }
        
    }


    or can you give me an example please??

    i am using .net framework 4.0.30319 and visual studio 2010




  2. Iam
    Iam avatar
    3 posts
    Member since:
    Dec 2012

    Posted 13 Dec 2012 Link to this post

    can any one answer this please..
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 15 Dec 2012 Link to this post

    Hello,

    I would suggest you to use the following approach that will expand all parent nodes if it needs and will select the clicked node:
    protected void Page_Load(object sender, EventArgs e)
        {
             string p_node_value;
             p_node_value = Session["p_node_value"].ToString();
             RadTreeNode clickedNode = RadTreeView1.Nodes.FindNodeByValue(p_node_value);
             clickedNode.ExpandParentNodes();
             clickedNode.Selected = true;
        }


    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Iam
    Iam avatar
    3 posts
    Member since:
    Dec 2012

    Posted 17 Dec 2012 Link to this post

    thanks alot..

    that helped
Back to Top