This is a migrated thread and some comments may be shown as answers.

how to manually close a dropdowntree using javascript

1 Answer 126 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Albert
Top achievements
Rank 1
Albert asked on 05 Aug 2016, 01:10 AM
<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

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 08 Aug 2016, 12:59 PM
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.
Tags
DropDownTree
Asked by
Albert
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or