Disable a cell edit depending on the value of the other column
Disable a cell edit depending on the value of the other column
I have refered this link to build my datatable. I wanted to edit only certain columns, so for that I used "<td data-title="{{row.name}}" class="name" data-name="name" data-type="text" data-pk="{{row.id}}">{{row.name}}</td>" this method to make the column editable. But now I want to make the "position" editable only if the value of the other column is "Available". If it is "Unavailable" it should be read only. And if anybody clicks on that cell it should give an alert saying "Editing not allowed since it is Unavailable."
I referred to a couple of questions on forum but couldn't build properly.
In the link I am using static data but I have used for loop to populate the data dynamically. I am new to js so tried to edit as much as I could.
I would really appreciate some help!
Thanks!
This question has an accepted answers - jump to answer
Answers
You can do that easily with Editor - see this example from this thread - you can only edit a row if the Office is "London".
Colin
Thanks Colin! It worked.
Our accounts aren't showing that you have an Editor license. Is the license registered to another email address? Please can let us know so we can update our records.
Thanks,
Colin