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 Link to this post

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

     

    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
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 08 Aug 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 %>');
        dropDownTree.closeDropDown();
    }

    <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.

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