Question

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();
});
Was it helpful?

Solution 4

To hide the Dropdown of RadComboBox: Hide RadComboxBox

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

OTHER TIPS

Try following code.

<script>
$(document).ready(function(){
$("#mybutton").click(function(){

     //hide
     $(this).hide();
     $("select.myddlist").hide();

});
});
</script>

hide is what you need here..

try this

$(function(){
    $("#yourButtonId").click(function(){
        $("#yourSelectid").hide();
        $(this).hide();
    });
});

It's pretty simple, just use the .hide() function.

jsFiddle

JavaScript

$('button').click(function () {
    $(this).hide();
    $('select').hide();
});

HTML

<select>
    <option>I wish I was hidden</option>
</select>
<button>Hide us!</button>

If you had more than one button on the page you should assign an id to your button.

JavaScript

$('#hide-button').click(function () {
    $(this).hide();
    $('select').hide();
});

HTML

<button id="hide-button">Hide us!</button>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top