Disable remove and update button
Disable remove and update button
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.initfunction add a listener for theselectanddeselectevents. 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
selectedbutton, which is defined here. You could use that as the basis for your own init function.Allan