Monday, 24 July 2017

Check Uncheck all using Jqury with Parent and Child case

// Jquery function

function CheckUncheck_AllCheckBoxes(chk, CheckParentID) {
    $('[id*=' + CheckParentID + ']').find("input:checkbox").each(function () {
        if (this != chk) {
            this.checked = chk.checked;
        }
    });
    return false;

}




// Html or Asp.net

<asp:CheckBox runat="server" ID="Chk_allFrequency"  onclick="CheckUncheck_AllCheckBoxes(this,'Parent ID static');"

 CssClass="pull-left" Text="Frequency" Checked="true" />



                                      

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...