How to dynamically disable one field from inline edits?
How to dynamically disable one field from inline edits?
hado
Posts: 2Questions: 1Answers: 0
I have a DataTable with Editor and KeyTable and there is a requirement to enable/disable editing of a field based on another field. Is this possible? I saw this example but it's disabling the entire row, not a specific field.
I'm already using a class to define which column is editable. Should I control cell edit-ability by setting the cell class dynamically based on row content (not sure how) or some other way?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The next example is disabling inline editing for a field called 'user.first_name'. But you can add your own logic to return false. For example, testing if field hasClass.
Thank you, this helped solve our problem precisely!