Search code examples
jquerytelerikradcombobox

Hide a RadComboBox drop down


I have a button in a footer section of drop down list.I want when i click on button the only drop down list to be hide along with the button. I want to hide the only ItemTemplate content

This is sample code

             <telerik:RadComboBox ID="RadCmbGeneralGroupCodes" runat="server"
                 <ItemTemplate>
                 <asp:CheckBox ID="chkProcedureGroupCodes" runat="server" Text='<%# Eval("ProcedureCode") + " "  + Eval("ProcedureName") %>'
               ToolTip='<%# Eval("ProcedureName") %>' ProcedureId='<%# Eval("ProcedureID") %>'
               ProcedureCode='<%# Eval("ProcedureCode") %>' 
               MaxQty='<%# Eval("MaxQty") %>'
               NoOfVisit='<%# Eval("NoOfVisit") %>'
               NoOfVisitForMainProc='<%# Eval("NoOfVisitForMainProc") %>'
               AddAdditionalPercentage='<%# Eval("AddAdditionalPercentage") %>'
               ParentProcedureID='<%# Eval("ParentProcedureID") %>'
               IsDenture='<%# Eval("IsDenture") %>'
               SurfaceCount='<%# Eval("SurfaceCount") %>'
               IsOptional='<%# Eval("IsOptional") %>'
               AlwaysOpt='<%# Eval("AlwaysOpt") %>'
               ToothEntry='<%# Eval("ToothEntry") %>'
               SurfaceType='<%# Eval("SurfaceType") %>'
               IsBillable='<%# Eval("IsBillable") %>
               AppliedToOffProv='<%# Eval("AppliedToOffProv") %>'
               DentalCost='<%# Eval("DentalCost") %>'
           OnClick="OnProcedureCodeItemChecked(this)"
                </ItemTemplate>
                 <FooterTemplate>
                <input id="cancel" type="button" value="Cancel" />
                </FooterTemplate>
            </telerik:RadComboBox>

I tried This but not working

$('#cancel').click(function () {
    $(this).hide();
    $('ItemTemplate').hide();
});

Solution

  • To hide the Dropdown of RadComboBox: Hide RadComboxBox

    $('#cancel').click(function () {
        var RadComboBox=$find("<%=RadCmbGeneralGroupCodes.ClientID%>")//find RadComboBox
        RadComboBox.hideDropDown();//hide RadComboBox dropdown
    }