How to add a checkbox column in datatable
How to add a checkbox column in datatable
aclalu
Posts: 2Questions: 2Answers: 0
Can any one help me how to add checkbox column in a datatable?
Thanks.
Here is my code:
$.ajax(ContainerINQJSONUrl, {
dataType: 'json',
type: "POST",
data: {
action: "getCurrentCartPaid",
userId: uid,
//connc: Port
},
success: function (data, status, xhr) {
//design the columns
var colParams2 = [
{ title: "User Id", data: "UserName" },
{ title: "Entry Number", data: "EntryNumber" },
{ title: "TIN", data: "TIN" },
{ title: "Current Status", data: "Status" },
{ title: "Date Saved", data: "DateCreated" },
{ title: "Cargo Amount", data: "CargoAmount" },
{ title: "Storage Amount", data: "StorageAmount" },
{ title: "Reefer Amount", data: "ReeferAmount" },
{ title: "Payment Reference Number", data: "PaymentReferenceNumber" },
{ title: "Invoice Number", data: "InvoiceNumber" },
{ title: "DatePaid", data: "DatePaid" }
];
//reveal the column
generateDataTable("#resultTableCartPaid", "tblCartActualPaid", data, colParams2);
},
error: function (jqXhr, textStatus, errorMessage) {
}
});
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Do you mean like this?
Allan
See jQuery DataTables Checkboxes plug-in for easy way to add checkboxes to a table powered by jQuery DataTables.
See more articles about jQuery DataTables on gyrocode.com.