This is a migrated thread and some comments may be shown as answers.

Select first Child Node while Expanding

1 Answer 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Brinda
Top achievements
Rank 1
Brinda asked on 23 Aug 2011, 07:08 PM
Hi,

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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Aug 2011, 07:26 AM
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.
Tags
TreeView
Asked by
Brinda
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or