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.
Unfortunately, activation email could not send to your email. Please try again.

Enable/disable buttons & center text & icon

Thread ID:





121406 Dec 10,2015 09:34 AM Dec 13,2015 11:11 PM JavaScript 3
Tags: ejRibbon
Antonio Terron
Asked On December 10, 2015 09:34 AM

I have two questions regarding the ribbon control.
 I'm using it with Angular JS. and I really a newbie using both ejribbon & angular.

1.- Can I disable/enabled buttons programmatically?
2.- Is it posible to center text & icon in buttons?

Thank you in advance

Kavitha Narayanan [Syncfusion]
Replied On December 11, 2015 03:37 AM

Hi Antonio,

Thanks for contacting Syncfusion support.

: Can I disable/enabled buttons programmatically?

We use disable()/enable() button methods to disable/enabled button in the ribbon control. In which, we get the button object from ribbon control using button id.

Please refer to the code and UG link



$(function () {

            var btnObj = $("#defaultRibbon_new").data("ejButton");// find button object from ribbon control, defaultRibbon is ribbon id and new is group id.

            btnObj.disable();//disable the button

            btnObj.enable(); //enable the button



UG link: http://help.syncfusion.com/js/api/ejbutton#methods:disable 

Query: Is it posible to center text & icon in buttons?

Yes, to align text and icon in center of button, we have enabled e-buttonsettings-text, e-buttonsettings-contenttype, e-buttonsettings-imageposition property in the ribbon control.

Please refer to the code.

<body ng-controller="RibbonCtrl">

<div e-groups>

     <div e-group e-id="new" e-text="New" e-customtooltip-content="<h6>New.<&#47;h6>" e-buttonsettings-text="New1" e-buttonsettings-contenttype="textandimage" e-buttonsettings-imageposition="imagetop" e-buttonsettings-prefixicon="e-ribbon e-new" e-buttonsettings-click="executeAction">




We can customize the button settings in the ribbon control using e-buttonsettings property. Please refer to the UG link and sample.

UG link: http://help.syncfusion.com/js/api/ejbutton 

Sample: http://www.syncfusion.com/downloads/support/forum/121406/ze/sample-1221719873.zip


Kavitha N.

Antonio Terron
Replied On December 11, 2015 08:34 AM

Thank you

Kavitha Narayanan [Syncfusion]
Replied On December 13, 2015 11:11 PM

Hi Antonio,
Please let us know if you have any query.
Kavitha N.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.