Remove Toolbar items

how to enable and disable toolbar items like add,edit based on ejs-dropdownlist value selected by the user.

1 Reply 1 reply marked as answer

HB Hareesh Balasubramanian Syncfusion Team October 2, 2020 08:22 AM UTC

Hi Nitin, 

Greetings from Syncfusion Support..! 

We have validated your shared query “how to enable and disable toolbar items like add,edit based on ejs-dropdownlist value selected by the user” at our end. And we have prepared a sample using disable public method of the Toolbar component and the sample can be downloaded from the following link. 

Code snippet
   function onChnage(args) { 
        var toolbarObj = document.querySelector('.e-toolbar').ej2_instances[0]; 
        (args.value == "enable") ? toolbarObj.disable() : toolbarObj.disable(true); 
    } 


Kindly try the above solution and get back to us if you need any further assistance. 

Regards, 
Hareesh 


Marked as answer
Loader.
Up arrow icon