Radtreelist -expand at client side ..(Urgent)

2 posts, 0 answers
  1. Sindu
    Sindu avatar
    46 posts
    Member since:
    Oct 2011

    Posted 18 Nov 2011 Link to this post


    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)?

     

     

     

  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 22 Nov 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top