how to add a checkbox column to jquery datatable??
how to add a checkbox column to jquery datatable??
Hello,
I am creating a jQuery data table. below is the example of data i am passing as aaData and aocolumns ,
ex :
"aaData" : [{"Id":"A111","isChecked":"True"}, {"Id" : "B222" , "isChecked" : "False"}],
"aoColumns": [{ "sTitle": "Id","mDataProp": "Id" },{ "sTitle": "isChecked","mDataProp": "isChecked" }]
how to make the column "isChecked" as checkbox type, where if the value of isChecked is True then it should be checked and if it is false it should be unchecked.
Please help.
Thanks in advance.
I am creating a jQuery data table. below is the example of data i am passing as aaData and aocolumns ,
ex :
"aaData" : [{"Id":"A111","isChecked":"True"}, {"Id" : "B222" , "isChecked" : "False"}],
"aoColumns": [{ "sTitle": "Id","mDataProp": "Id" },{ "sTitle": "isChecked","mDataProp": "isChecked" }]
how to make the column "isChecked" as checkbox type, where if the value of isChecked is True then it should be checked and if it is false it should be unchecked.
Please help.
Thanks in advance.
This discussion has been closed.
Replies
How about type: 'checkbox' somewhere?
Amazing how something so simple is made so convoluted.
If you can help then help don't put the bullshits.
I have a hard time finding this but I hope this link can help:
http://editor.datatables.net/examples/api/checkbox.html
The editor plugin is a paid license and NOT under MIT license. Is there an alternative to having this Editor plugin in order to be able to place a checkBox in a cloumn and be able to click on it so the checkBox is toggled on/off?