Select first Child Node while Expanding

2 posts, 0 answers
  1. Brinda
    Brinda avatar
    5 posts
    Member since:
    May 2011

    Posted 23 Aug 2011 Link to this post

    Hi,

    While expanding the treeview node,the first child node should get selected by default.
    Can anybody help me

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

    Posted 24 Aug 2011 Link to this post

    Hello Brinda,

    You can achieve this by attaching the client event OnClientLoad as shown below.
    Javascript:
    function OnClientLoad(sender,args)
    {
      var node=sender.findNodeByText("Node1");
      node.set_selected(true);
    }

    Thanks,
    Princy.
Back to Top