Page 1 of 1
Find and change visual component
Posted: Fri Sep 30, 2016 1:26 pm
by MAnKabanov
Hi. I want change save report menu, add new item to process click on it. How can I do it?
And can I find some visual component foe example button to show designer and bind my listeners to it?
And one more - where can I find list of events whats report.JS fires?
Re: Find and change visual component
Posted: Mon Oct 03, 2016 1:21 pm
by HighAley
Hello.
MAnKabanov wrote:I want change save report menu, add new item to process click on it. How can I do it?
You could add a new export button with next code:
Code: Select all
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiWebViewer1", false);
viewer.renderHtml("viewerCont");
var saveMenu = viewer.jsObject.controls.menus.saveMenu;
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "myItemName", "My item", "empty.png", "customItemKey");
saveMenu.innerContent.appendChild(customSaveItem);
customSaveItem.image.src = "https://www.stimulsoft.com/favicon.png" //here you can set your image
customSaveItem.action = function () {
saveMenu.changeVisibleState(false);
alert("My item was clicked!");
}
MAnKabanov wrote:And can I find some visual component foe example button to show designer and bind my listeners to it?
Could you describe this issue more detailed? What kind of listeners do you want to add?
MAnKabanov wrote:And one more - where can I find list of events whats report.JS fires?
Unfortunately, there is no such documentation now.
We are working on it now.
Thank you.