Hi Pablo,
Thanks for your update.
Query : The "add, edit and delete" buttons are disabled with the proposed solution. but when any filtering option is clicked they are enabled again. how can you control that?
The built-in toolbar items Add, Edit, Delete, Cancel, Update are used to perform CRUD actions in the Grid.
When performing any action in the Grid refreshes the whole Grid, so the toolbar module enables/disables default built-in items (Add, Edit, Delete, Cancel, Update) based on Grid’s edit state. Since this is the behavior of EJ2 Grid.
Based on your query we could see that you need to disable the Add, Edit, Delete button for each grid action. You can achieve this by disabling edit Settings in the Grid, please refer to the below code example and sample for more information.
buttonClickdisable(args){
this.grid.editSettings.allowAdding = false; // disables the add button
this.grid.editSettings.allowEditing = false; // disables the Edit button
this.grid.editSettings.allowDeleting = false; // disables the Delete button
this.grid.toolbarModule.enableItems(['Click'], false); // Disable toolbar items.
}
|
Please get back to us if you need further assistance with this.
Regards,
Rajapandiyan S