This Knowledge base explains the way of how to show or hide the toolbar items in grid based on selected row index.
This can be achieved using rowSelected event of ejGrid. The rowSelected event will get trigger when selecting the rows of the grid and based on the rowIndex (argument in rowSelected event) value the toolbar items in grid can be show or hide.
The following code example demonstrates how to show or hide the toolbar items based on selected row index:
Figure 1: shows the edit icon in toolbar when the selected row index is less than 5
Figure 2: shows the add icon in toolbar when the selected row index is greater than 5 and less than 7.
Figure 3: shows add and delete icon in toolbar items when selected row index is greater than 7.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|