I'm using the latest version 1.10.0 of Datatables Plugin for JQuery and need to have some columns editable and some not. Since datatables does not offer this functionality out of the box and following directions from here I added in my columns
initialization/specification a class readonly
that I use to check against e.g.
"drawCallback": function(settings) {
var dt = this;
$('tbody td[class != "readonly"]').editable("/@context/edit/do",
This works but it is insufficient for my needs because I need to filter when readonly
occurs as a substring of the class i.e. there are other classes as well e.g. readonly sorting_1
. I have tried doing the following but it fails:
"drawCallback": function(settings) {
var dt = this;
$('tbody td[class.indexOf("readonly") == -1]').editable("/@context/edit/do",
with error:
Error: Syntax error, unrecognized expression: tbody td[class.indexOf("readonly") == -1]
How can this be done?