Telerik
Home / Community / Forums / RadControls for ASP.NET AJAX: TreeView / Hide toggle image button of Root node on page load

Not answered Hide toggle image button of Root node on page load

Feed from this thread
  • sparton avatar

    Posted on Aug 6, 2008 (permalink)

    I'm using RAD Treeview Q2 2008.  Please give me an idea or better yet sample code on how to hide the toggle image button of the root node on page load. I tried doing the suggestions in the following thread

    http://www.telerik.com/community/forums/thread/b311D-bebhgk.aspx

    but wasn't able to accomplish what I want as $find("<%=RadTreeView1.ClientID%>") is always null on page load, either using ScriptManager.RegisterStartupScript() or by including the script on client-side page. I'm generating the nodes server-side with the root node automatically expand and disabled, thus end-users cannot toggle the node.

    Thanks in advance.

    JM

    Reply

  • Telerik Admin admin's avatar

    Posted on Aug 6, 2008 (permalink)

    Hi sparton,

    You can use the OnClientLoad event of RadTreeView and use the approach described in the other forum thread. The treeview client-side object will be initialized during OnClientLoad.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • sparton avatar

    Posted on Aug 6, 2008 (permalink)

    Thanks but I tried doing that a while ago and for some reason the OnClientLoad event wasn't called on page load. Is there another way to do this?

    Reply

  • Telerik Admin admin's avatar

    Posted on Aug 6, 2008 (permalink)

    Hello sparton,

    The OnClientLoad event should be fired on page load provided you are using the latest official release. You can check our online demo.

    The other option is to use the pageLoad javascript function which is part of the ASP.NET Ajax client-side lifecycle:
    <script type="text/javascript">
    function pageLoad()
    {
     //Your code here.
    }
    </script>
    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

Related resourses for "Hide toggle image button of Root node on page load"

ASP.NET TreeView Features  |   Documentation   |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2009 Telerik. All rights reserved.