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

Enable/disable buttons & center text & icon

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

3 Replies

KN Kavitha Narayanan Syncfusion Team December 11, 2015 08:37 AM UTC

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.

UN Unknown Syncfusion Team December 11, 2015 01:34 PM UTC

Thank you

KN Kavitha Narayanan Syncfusion Team December 14, 2015 04:11 AM UTC

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

Live Chat Icon For mobile
Up arrow icon