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

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...