Wednesday 18 July 2018

Single checked inside gridview using jquery

///////////// JS


function SingleCheckInside_Table(th) {
                        var userType = $(th).closest('tr').find('td').eq(1).html();
                        var selectedIndex = $(th).closest('tr').index();
                        $('[id*=TableID] tr').each(function (index, item) {
                            if (index > 0) {
                                if (selectedIndex != index) {
                                    $('[id*=TableID] tr').eq(index).find('[id*=CheckboxID]').prop('checked', false);

                                }
                            }
                        });
                    }

////////////////////////////html

  <table><tr><td>


<asp:CheckBox runat="server" ID="Checkboxid" onclick="return SingleCheckInside_Table(this);" />


 </td></tr></table>


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 ,","...