Disable Edit, or read only row
Disable Edit, or read only row
I have the need to either disable the edit button. I have been successful with the js to select this data however it seems that the underlying scripts prevent this enable/disable from operating as expected for example via:
table.button( 1 ).enable( data === 1 );
Is there a means that I am over looking to make this function as intended? Alternatively, another option would be to mark a row as read only, is this a possibility?
This question has an accepted answers - jump to answer
Answers
The
edit
button has its own enable and disable code via theselected
(source code) which will do its own enable / disable. I suspect that is what is interfering with your own.I'd suggest providing your own
init
function for your button which should add whatever event handlers you need - that will override the original, making sure that there will be no conflict.Allan
Allan,
Thanks for the help that was exactly the direction I needed to go. The below was successful: