BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Thanks for using Syncfusion products.
We suggest you to provide unique ID for all buttons in the ribbon control use “ContentGroup” tag. Please refer the below Code snippets,
<ej:ContentGroup Id="cut" ToolTip="Cut" Text="Cut">
<ButtonSettings ContentType="TextAndImage" Type="Button" PrefixIcon="e-ribbon e-ribboncut" Click="executeAction" />
</ej:ContentGroup>
<ej:ContentGroup Id="copy" ToolTip="Copy" Text="Copy">
<ButtonSettings ContentType="TextAndImage" Type="Button" PrefixIcon="e-ribbon e-ribboncopy" Click="executeAction" />
</ej:ContentGroup>
<ej:ContentGroup Id="clear" ToolTip="Clear All " Text="Clear">
<ButtonSettings ContentType="TextAndImage" Type="Button" PrefixIcon="e-ribbon clearAll" Click="executeAction" />
</ej:ContentGroup>
To check which button is clicked during an javascript action use text of the button from the event’s arguments.
function executeAction(args) { // In the attached sample we have used common name for all button click events
var val=args.model.text; // Text of the button from the args.
}
Please find the below sample for your reference.
Sample: http://www.syncfusion.com/downloads/support/forum/119108/RibbonButton's_ID-384901057.zip
Please let us know if you need any further assistance.
Regards,
Sarath Kumar P.
Thanks for your update.
We suggest you to use individual click event for each button and with this if your requirement is not resolved, please get back to us and we will analyze and update you the response accordingly.
Please let us know if you need any further assistance.
Regards,
Sarath Kumar P.
Hi Rakotondrabesa,
Thanks for your update.
We suggest you to use “this._id” to achieve your requirement.Please refer the below Code snippets,
function executeAction(args) {
var val=this._id; //Use this._id to get clicked button’s id.
alert(val + " is clicked");
}
The ID format for ribbon button is Ribbon ID+”_”+Button ID. In the attached sample id of ribbon button “new” will be “defaultRibbon_new”.
Please find the below sample for your reference.
Sample: http://www.syncfusion.com/downloads/support/forum/119108/RibbonButton_id-1860333619.zip
Please let us know if you need any further assistance.
Regards,
Sarath Kumar P.
Hi Rakotondrabesa,
Thanks for your update.
Please let us know if you need any assistance.
Regards,
Sarath Kumar P.