how to set default selected(hightlighted) node in radtreeview

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 08 Jan 2013 Link to this post

    how to set default selected(hightlighted) node in radtreeview on server side?

    On my notes tree, first level is color, size, inside color has red, blue...
    how to say if tree node name ="red", then select the red node as default (hight lighted)?

    I tried below, but doesnt' work for me

     

     

    RadTreeNode node = radTVActions.FindNodeByValue("Red");

     

     

     

    if (node != null)

     

    {

    node.Selected =

     

    true;

     

    }



    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Jan 2013 Link to this post

    Hi,

    Try the following code snippet to achieve your scenario.

    C#:
    RadTreeNode node = radTVActions.FindNodeByValue("Red");
    if (node != null)
     {
        node.Selected = true;
        node.Expanded = true;
        node.ExpandParentNodes();
        node.Focus();
     }

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top