How to add a column with checkbox.
How to add a column with checkbox.
Hi,
Could some show me how this example is created, especially on how to add the checkboxes?
http://datatables.net/release-datatables/examples/api/form.html
Here is my code:
oTable = $('#tableList').dataTable({
"bJQueryUI": true,
"bProcessing": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 10,
"sAjaxSource": "Home/GetMethod1",
"sAjaxDataProp": "",
"aoColumns": [
{ "mDataProp": "ID" },
{ "mDataProp": "FirstName" },
{ "mDataProp": "LastName" }
<----- Checkbox goes here
]
});
My html code:
User ID
First Name
Last Name
Select <----- Header for the checkbox
Any help is greatly appreciated.
Thanks.
Could some show me how this example is created, especially on how to add the checkboxes?
http://datatables.net/release-datatables/examples/api/form.html
Here is my code:
oTable = $('#tableList').dataTable({
"bJQueryUI": true,
"bProcessing": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 10,
"sAjaxSource": "Home/GetMethod1",
"sAjaxDataProp": "",
"aoColumns": [
{ "mDataProp": "ID" },
{ "mDataProp": "FirstName" },
{ "mDataProp": "LastName" }
<----- Checkbox goes here
]
});
My html code:
User ID
First Name
Last Name
Select <----- Header for the checkbox
Any help is greatly appreciated.
Thanks.
This discussion has been closed.
Replies
Allan
Are you saying to build my html in the controller?
Also, I am using entity framework and mvc.
Thanks.
[code]
{ "aaData": [
{
"ID": "1",
"FirstName": "John",
"LastName": "Smith",
"checkBox": ""
}
...
] }
[/code]