Find and change visual component

Stimulsoft Reports.JS discussion
Post Reply
MAnKabanov
Posts: 2
Joined: Fri Sep 30, 2016 1:20 pm

Find and change visual component

Post 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?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Find and change visual component

Post 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.
Post Reply