Expand/Collapse all nodes in Q3

6 posts, 1 answers
  1. Eric Santos
    Eric Santos avatar
    12 posts
    Member since:
    Nov 2008

    Posted 01 Dec 2008 Link to this post

    Hi!!

    I was trying to expand/collapse all nodes client side and I saw this page teaching with a very simple code:

    http://www.telerik.com/help/aspnet-ajax/tree_clientexpandingcollapsing.html

    I was very happy but when I tested it, didn't work. I guess it's because I'm using Q3 and not prometheus. Now, I have three questions:

    1. Is there a easy way to do the same with Q3?
    2. How can I know, when exploring telerik web page, that I'm at a prometheus help article and not at Q3, since I haven't see any description about it in the page?
    3. Where can I find help pages just for Q3?

    We still doesn't have the prometheus version here (we depends from the directors to buy), but we have the beta version files here, so we could find that the method get_allNodes() was from Prometheus, analysing the script files.
    Thanks in advance and god bless!
  2. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 02 Dec 2008 Link to this post

    Hello Eric,

    I guess you are still using the old "Classic" version of RadTreeView for ASP.NET, but you are looking through the documentation of the new AJAX version of the control.

    Here's a sample code snippet that shows the needed approach for RadTreeView for ASP.NET.

    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
     
        <script type="text/javascript">  
        function treeExpandAllNodes()  
        {  
            var tree = <%= RadTreeView1.ClientID %>;  
            var i;  
            for(i=0; i<tree.AllNodes.length; i++)  
            {  
                tree.AllNodes[i].Expand();  
            }  
        }  
     
        function treeCollapseAllNodes()  
        {  
            var tree = <%= RadTreeView1.ClientID %>;  
            var i;  
            for(i=0; i<tree.AllNodes.length; i++)  
            {  
                tree.AllNodes[i].Collapse();  
            }  
        }  
        </script> 
     
        <rad:RadTreeView ID="RadTreeView1" runat="server">  
            <Nodes> 
                <rad:RadTreeNode runat="server" Text="New Item">  
                    <Nodes> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                        </rad:RadTreeNode> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                        </rad:RadTreeNode> 
                    </Nodes> 
                </rad:RadTreeNode> 
                <rad:RadTreeNode runat="server" Text="New Item">  
                    <Nodes> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                        </rad:RadTreeNode> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                            <Nodes> 
                                <rad:RadTreeNode runat="server" Text="New Item">  
                                </rad:RadTreeNode> 
                                <rad:RadTreeNode runat="server" Text="New Item">  
                                    <Nodes> 
                                        <rad:RadTreeNode runat="server" Text="New Item">  
                                        </rad:RadTreeNode> 
                                        <rad:RadTreeNode runat="server" Text="New Item">  
                                        </rad:RadTreeNode> 
                                        <rad:RadTreeNode runat="server" Text="New Item">  
                                        </rad:RadTreeNode> 
                                    </Nodes> 
                                </rad:RadTreeNode> 
                                <rad:RadTreeNode runat="server" Text="New Item">  
                                </rad:RadTreeNode> 
                                <rad:RadTreeNode runat="server" Text="New Item">  
                                </rad:RadTreeNode> 
                            </Nodes> 
                        </rad:RadTreeNode> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                        </rad:RadTreeNode> 
                        <rad:RadTreeNode runat="server" Text="New Item">  
                        </rad:RadTreeNode> 
                    </Nodes> 
                </rad:RadTreeNode> 
            </Nodes> 
        </rad:RadTreeView> 
        <href="javascript: treeExpandAllNodes();" class="RadTreeView_Hay">Expand All Nodes</a> 
        <href="javascript: treeCollapseAllNodes();" class="RadTreeView_Hay">Collapse All Nodes</a> 
    </form> 

    In addition, here's the documentation for RadTreeView for ASP.NET.

    Regards,
    Paul
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eric Santos
    Eric Santos avatar
    12 posts
    Member since:
    Nov 2008

    Posted 02 Dec 2008 Link to this post

    It worked perfectly!!
    Thank you so much!!!
  5. Alaa Majzoub
    Alaa Majzoub avatar
    49 posts
    Member since:
    Nov 2007

    Posted 24 Oct 2009 Link to this post

    This looks nice, but how to do it for a tree inside a combo box?

    how can i reach the tree?
  6. Alaa Majzoub
    Alaa Majzoub avatar
    49 posts
    Member since:
    Nov 2007

    Posted 24 Oct 2009 Link to this post

    Nevermind it, i found how here
    http://www.telerik.com/help/aspnet-ajax/introduction.html
    BTW: is there an offline version of this help? i downloaded some CHM files but they are way less detailed than this link!!!




  7. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 26 Oct 2009 Link to this post

    Hello Alaa Majzoub,

    The full package of the CHM files can be found here. The content there is the same as in the online help.

    Regards,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017