Expand TreeNodes Programatically

4 posts, 0 answers
  1. Sri
    Sri avatar
    22 posts
    Member since:
    Jun 2009

    Posted 23 Jun 2009 Link to this post

    I implemented Tree using Load on Demand concept using Web Services. It is working perfectly. But I would like to know the best way to expand the Tree Nodes automatically on click on a context menu. I have a context menu item called "Expand All" and when the User clicks on the item on a Node which has less number of children and sub children, it works fine. If he clicks on the top of the tree, I am getting an error "maximum limit reached".

    Below is the code I am using:

    private sub ExpandAll(Tnode as RadTreeNode)

    If TNode.Nodes.Count = 0 Then _

     

     PopulateHierarchy(TNode)

     

     

    RdTViewHierarchy.SelectedNode.ExpandChildNodes()

     

     

    TNode.ExpandMode = TreeNodeExpandMode.ClientSide

     

     

    TNode.Expanded = True

     

     

    For Each TSubNode As RadTreeNode In TNode.Nodes

     

     

     ExpandSelectedNode(TSubNode)

     

     

    Next

     

    End Sub

     

     

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Jun 2009 Link to this post

    Hello Sri,

    I suggest you check this help topic.

    Greetings,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Sri
    Sri avatar
    22 posts
    Member since:
    Jun 2009

    Posted 24 Jun 2009 Link to this post

    I have the jsonSerialization in the web.config file. But I still have this issue.
    When I expand in the code behind, does it relate to jsonSerialization? I guess it is for a webservice and not for a method in the code behind.
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Jun 2009 Link to this post

    Hi Sri,

    Could you please open a support ticket and send us your page? We need to reproduce the example locally so we know what is causing the exception. Thanks.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top