add new option to menu save

Stimulsoft Reports.JS discussion
Post Reply
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

add new option to menu save

Post by jpgb »

Is there a way to add a new option to menu save?

And capture the click event of that button?

Basically i want to do a personalized export function...

Thanks
JB
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: add new option to menu save

Post by jpgb »

Sorry. Found it in a post!

JB
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: add new option to menu save

Post by jpgb »

One problem: When i add the option, the icon doesnt show... the style is display:none
How can i avoid this?

var saveMenu = viewer.jsObject.controls.menus.saveMenu;
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "myItemName", "certificate", "certificate.png", "customItemKey");
saveMenu.innerContent.appendChild(customSaveItem);
customSaveItem.image.src = "........img/certificate.png"
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: add new option to menu save

Post by Lech Kulikowski »

Hello,

//if you need add image to item, for example:
viewer.jsObject.collections.images["customImageName"] = "https://www.stimulsoft.com/templates/st ... es/usa.png";
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "itemName", "Item Text", "customImageName"/*or null*/ , "itemKey");

Thank you.
Attachments
viewer.zip
(1.13 KiB) Downloaded 97 times
Post Reply