4
Answers

DataTable Selected Row Checkbox Ids Not Working Properly

Mohit Kala

Mohit Kala

6y
9.7k
1
below is my datatable
 
 
 
When i Selected 2 rows it displays ids
using below code
$("#btn").on("click", function () {
debugger;
var id = $('#myDataTable2 input[type="checkbox"]:checked').map(function () {
return $(this).val();
}).get();
alert(id);
if (id.length === 0) {
swal('', 'Please Select Question', 'warning');
}
});
 
But When i Clicked To Second Page Using Pagination Then it not Get Ids  
Answers (4)