Get The Corresponding Row Values For Check Box Checked Row In Grid View Using Javacsript
I have following grid with check boxes on each row, i want to get the corresponding selected row cells value when i checked the check box .. I am able to give the alert when the
Solution 1:
You can do this. It attaches a function to the checkbox change, finds the nearest tr
and loops all the td
<scripttype="text/javascript">
$(document).ready(function () {
$('#<%= gvPRCertInfo.ClientID %> input[type="checkbox"]').change(function () {
$(this).closest('tr').children('td').each(function () {
alert($(this).html());
});
});
});
</script>
However you have an AutoPostBack="true"
in your checkbox, so everything you do in javascript is lost immediately due to a PostBack.
Post a Comment for "Get The Corresponding Row Values For Check Box Checked Row In Grid View Using Javacsript"