We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add to Ribbon dynamically


is it possible to add a button to a particular tab/group after the ribbon has been created?

I tried:

@ViewChild('mainTabControl') ribbon: EJComponents<ej.Ribbon, any>;

however then i got the widget under ribbon like:  ribbon.widget.

But i can't find out how to insert into an existing tab or group.

Can you help please?

1 Reply

DL Deepa Loganathan Syncfusion Team January 30, 2019 01:05 PM UTC

Hi Sumair, 

We have checked your requirement "To add new button after ribbon creation to a particular tab/group". You can use addTabGroupContent method to dynamically add buttons to existing tab groups using it's tab index. We have prepared a sample for your reference. In this sample, we have added new button to "New" tab group on button click using its's tab index. Please check below code block and sample. 

var content = { id: "newButton", text: "Button", } 
this.ribbon.widget.addTabGroupContent(1, 0, content); 

Please check it and get back to us if you have any further concerns. 

Deepa L. 

Live Chat Icon For mobile
Up arrow icon