Disable remove and update button
Disable remove and update button
azonekz@gmail.com
Posts: 32Questions: 9Answers: 1
Hi!
Is it possible to disable remove and update button when I select row?
It enables when I select row, but I need it disabled for some rows.
I have used https://datatables.net/reference/api/button().disable() but it not worked for me.
Thanks in advance
This discussion has been closed.
Answers
Hi azonekz@gmail.com, can you confirm that you have assigned the name property to your edit and remove buttons? For example:
You'd need to use a custom button for this. Specifically, in the button's
buttons.buttons.init
function add a listener for theselect
anddeselect
events. You can then decide in that function if you want to make the button active or not.The builtin button types in Editor for edit and delete extend the
selected
button, which is defined here. You could use that as the basis for your own init function.Allan