I have already bind a html table using jQuery json. I want to get multiple checkbox value using jQuery json and delete by selected multiple delete method. This is my code for bind the table.
$(function () {
debugger
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebForm5.aspx/BindDatatable",
data: "{}",
dataType: "json",
success: function (dt) {
debugger;
for (var i = 0; i < dt.d.length; i++) {
$("#example1 > tbody").append(" " + dt.d[i].CategoryID + " " + dt.d[i].Name + " " + dt.d[i].Status + " ");
}
$("#example1").DataTable();
},
error: function (result) {
alert("Error");
}
});
});
This is my Button to Delete selected(multiple delete):
This is my html table:
| Check Box | Category Name | Category Details | Status | Action |
|---|
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeev PunhaniPosted Jul 11, 2016, 8:10 AM
Hi Manoj,
What exactly do youneed? Please post aspx and aspx.cspage so that we canhelp you in a better way.
Manoj MaharanaPosted Jul 11, 2016, 6:36 AM
Rajeev PunhaniPosted Jul 11, 2016, 6:32 AM
Please find the sample html. In place of alert you can call your delete function. Also you need to populate the checkbox value to delete particular record.
If the above solution is helpful then,accept the answer.
Manoj MaharanaPosted Jul 11, 2016, 5:31 AM
Rajeev PunhaniPosted Jul 11, 2016, 4:35 AM
Hi Manoj,
Please add value to each checkbox dt.d[i].CategoryID.
If the above solution is helpful then,accept the answer.