I need to add custom ribbon tab and defined its' child components as in below screenshot.I have followed instruction in this page but couldn't proceed further. https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/?_gl=1*1my432d*_ga*MTUxODQyOTI4NC4xNjMxNjA3Mjgx*_ga_WC4JKKPHH0*MTYzMjA1NjQxOC4yMC4xLjE2MzIwNTc1MTcuMA..&_ga=2.123655055.521482534.1632056421-1518429284.1631607281#addribbontabs
Could you please provide me an example which has following features.
|
this.spreadsheetObj.addRibbonTabs([
{
header: { text: 'Custom' }, // To add customized option with sub option
content: [
{
id: 'CustomButton',
tooltipText: 'CustomButton',
template: this.appendDropdownBtn('custombtn')
}
]
}
]);
public appendDropdownBtn(id: string): HTMLElement {
let ddlItems: ItemModel[] = [
{
text: 'Custom Text1'
},
{
text: 'Custom Text2'
}
];
let btnObj: DropDownButton = new DropDownButton({
items: ddlItems,
content: 'Custom',
select: (args: MenuEventArgs): void => {
alert(args.item.text + ' clicked');
}
});
btnObj.appendTo(createElement('button', { id: id }));
return btnObj.element;
} |
Hi Janakiraman,
Your sample helped me to resolve my problem. Thank you for your support.
I have new requirement that add a button with prefix icon to ribbon tab as in following example
I tried prefixIcon property without any success as below. Could you please help me to get this work and point me where I can find syncfusion icon repository?
|
let btnObj: DropDownButton = new DropDownButton({
items: ddlItems,
content: 'Custom',
iconCss:"ddb-icons e-search",
select: (args: MenuEventArgs): void => {
alert(args.item.text + ' clicked');
}
});
btnObj.appendTo(createElement('button', { className: 'e-icons', id: id }));
|
Thank you for the sample. However I am interesting on now is to add prefix icon (using prefixIcon) to button as in below screenshot.