restrict inline editing to specific fields
restrict inline editing to specific fields
I have implemented inline editor using the example here
https://editor.datatables.net/examples/inline-editing/simple.html
Is it possible to restrict inline editing to a specific field, but maintain editing of all fields when the editor modal is visible ?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Do you know what field it is? Is it going to change dynamically? Do you want to be able to make the editor also work on the inline field?
It is possible, the way you do it just changes depending on the questions above.
You would essentially change this code:
To function based on a click of a specific column or specific row or whatever you're looking to do.
Thx for the reply.
The field name will not change dynamically,
In this instance, I am retrieving my columns from an ajax object, so I have a field called 'ChequeNumber' which I want to use in my editor instance and inline, but it is the only field I want to be able to edit inline
I would suggest adding the class
editable
to the columns you want to be inline editable and then modifying the selector as Modgility suggested to match on that (rather than the:not(...)
that you are currently using.Allan
Thanks guys, I was looking at it from the wrong perspective.
What I did was restrict which column would enable the editor
eg