You can disable or enable the ToolBar items by using the disableItem or enableItem method of the ejToolbar, respectively. You can use these public methods to the toggle state of the Grid’s ToolBar items.
The following code explains how to disable the toolbar items dynamically. Initially, you can render the checkbox in a checked state, and call the change function as follows.
Once this function is called, it disables or enables the ToolBar items based on their status.
You can see the Add and Edit ToolBar items disabled after unchecking the respective checkboxes.
Figure 1: Disabled ToolBar Items in the Grid
This page will automatically be redirected to the sign-in page in 10 seconds.