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

Radtreelist -expand at client side ..(Urgent)

1 Answer 156 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Sindu
Top achievements
Rank 1
Sindu asked on 18 Nov 2011, 09:49 AM

Hi,

 I have a RadTreelist inside RadTreeviewNodes.
 My requirement is to expand RadTreelist at first level when expanding the treeview node.
I have given the code below

function

 

 

ClientNodeExpanded()

 

{

 

 

var treeView = $find("<%= tree.ClientID %>");

 

 

 

 

var nodes = treeView.get_allNodes();

 

 

 

for (var i = 0; i < nodes.length; i++) {

 

 

 

if (nodes[i].get_nodes() != null) {

 

alert(

 

'hi');

 

 

 

var treelist = nodes[i].get_nodes().getNode(i).findControl("RadTreeList1");

 

treelist.ExpandAllItems();

 

}

}

 

}

treelist.ExpandAllItems() is not workng ...how can I expand treelist at clientside?

 

list.ExpandAllItems();list.ExpandItemToLevel(1) ; these are the C# code for expanding treelist to all items and expand the firstlevel only.
what are the corresponding functions in clientside (javascript)?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 22 Nov 2011, 08:57 AM
Hello Sindu,

You can try using the fireCommand() method and see if it helps in your case. Find more information in the below articles:
http://www.telerik.com/help/aspnet-ajax/treelist-firecommand.html
http://www.telerik.com/help/aspnet-ajax/treelist-class-members.html

Greetings,
Iana Tsolova
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
Tags
TreeList
Asked by
Sindu
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or