How can i get selected records inside webgrid by checkbox in mvc without using Html.BeginForm.
I want to copy some rows from grid to another grid ??
How can i do this in MVC with javascript or Jquery or any other solution ?
Thanks
Hi MElbakly,
Refer the below code.
$('#webgrid1 input[type=checkbox]').on('click', function () { if ($(this)[0].checked) { var headerRow = $('#webgrid1 tbody tr:first').clone(true); var row = ''; var tds = ''; $($(this).closest('tr').find('td')).each(function (i, item) { if (i > 0) { tds += item.outerHTML; } }); row += "<tr>" + tds + "</tr>"; $('#webgrid2').append(row); } });
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.