Programmatically toggling the inlineedit class for specific column
Programmatically toggling the inlineedit class for specific column
Hi,
I have a standalone checkbox (not within a datatable) that when clicked updates some backend data and then reloads the data via ajax on a datatable, but one of the columns (the 10th column) must only be inline editable when the aforementioned checkbox is unticked.
Currently, I'm handling this by refreshing the page after the checkbox has been clicked, but it is not very elegant or efficient.
So my question is, can I use javascript to toggle the 'inlineedit' class for a specific column when the checkbox is ticked or not?
Thanks, Chris
Answers
I think I've found what I'm looking for:
var cells = table.cells( null, 10 ).nodes();
$( cells ).toggleClass( 'inlineEdit' );
Looks good - nice one. Thanks for posting back.
Allan