Disable all checkboxes in table
Disable all checkboxes in table
The code below disables all table controls except the checkboxes. How can I disable the checkboxes too?
My Datatable is named fritidsList and my checkboxes have the class .friChk. I have tried to target all checkboxes, all inputs etc. but I just can't find the right setting. Any help would be appreciated.
if (userRole === "teacher" || userRole === "library") {
editor.disable();
table.buttons().disable();
table.select.style('api');
$('#fritidsList :input.friChk').prop("disabled", true);
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Do you mean checkboxes like in this example or actual HTML
inputcheckboxes?Could you link to the page showing the issue so I can see what is happening please?
Allan
Hi Allan, the checkboxes are HTML input checkboxes like your example https://datatables.net/blog/2014-09-09#Complete-code
Hi again. I solved it. I put the disabled property in the row callback.
Thanks for the help. Please close the ticket.