Inline editing with hidden editor fields
Inline editing with hidden editor fields
Hi,
I've just enabled inline editing on my project and it is amazing
But, I have one little issue, on some of my editor custom forms, I programmatically hide fields that I do not want to be edited but I need to submit to the server upon editing.
I hide fields using code like below:
Projects_editor.hide('projects.proj_id');
And I enable inline editing using the following code:
// Inline editing
$('#dtProjects').on( 'dblclick', 'tbody td', function () {
Projects_editor.inline( this, {
submitOnBlur: true
} );
} );
My question is can I add a condition that checks if the td being edited is hidden or not?
Or maybe even better can I check the object is a member of a certain class, that way I can add even more control to which fields are inline editable?
Cheers, Chris
This question has an accepted answers - jump to answer
Answers
This example allows editing certain table rows only and within those rows you can edit certain clolums only:
Using rowCallback (you'll find that in the docs) I set the class for those rows that qualify for editing:
Using columnDefs (in the docs as well) I assign the class for the column based on a class I set in the HTML of the data table:
And, yes: targets can be classes:
And this is the HTML:
Thank you, this is exactly what I need