how to manually close a dropdowntree using javascript

2 posts, 0 answers
  1. Albert
    Albert avatar
    1 posts
    Member since:
    Jun 2015

    Posted 04 Aug 2016 Link to this post

            <asp:Button ID="btnOk" OnClientClick="" Text="OK" runat="server" />
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" />


    I add two buttons in the dropdowntree via FooterTemplate, how to close the dropdowntree using javascript when users click Ok or Cancel buttons

  2. Ivan Danchev
    Ivan Danchev avatar
    1268 posts

    Posted 08 Aug 2016 Link to this post

    Hello Albert,

    You can close the DropDownTree's dropdown by calling the control's closeDropDown() client-side method, as shown in the snippet below:
    function btnOkClientClick(sender) {
        var dropDownTree = $find('<%=RadDropDownTree1.ClientID %>');

    <asp:Button ID="btnOk" OnClientClick="btnOkClientClick(); return false;" Text="OK" runat="server" />

    More information about this and other important client-side methods of the RadDropDownTree object is available in the documentation.

    Ivan Danchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top