Sometimes you may want to disable checkboxes during table initialization or enable/disable checkboxes dynamically at runtime.
This is possible with cell().checkboxes.enable() and cell().checkboxes.disable() API methods.
Preferred solution
Code shown below will work in all cases except when HTML sourced data is used or deferred rendering is enabled in client-side processing mode with deferRender: true
option. In these cases see alternative solution below.
Example
In the example below checkboxes and row selection are disabled for all employees with Software Engineer
position.
Alternative solution: HTML-sourced data or deferred rendering
Solution demonstrated below should be used if you use HTML sourced data or enabled deferred rendering in client-side processing mode with deferRender: true
option.
Example
In the example below checkboxes and row selection are disabled for all employees with Software Engineer
position.