Add Custom Button/Group To Web Designer Toolbar
-
- Posts: 45
- Joined: Tue May 21, 2019 1:44 pm
Add Custom Button/Group To Web Designer Toolbar
Hi, is there a way to add a Custom Button and/or Group To a Web Designer Toolbar, like the example here:
https://www.stimulsoft.com/en/samples/a ... the-viewer
but for the designer not the Viewer?
Chris Holland
https://www.stimulsoft.com/en/samples/a ... the-viewer
but for the designer not the Viewer?
Chris Holland
Re: Add Custom Button/Group To Web Designer Toolbar
Hello.
The Designer is much more complicated.
What kind of button do you want to add there?
And where do you want to add it?
Thank you.
The Designer is much more complicated.
What kind of button do you want to add there?
And where do you want to add it?
Thank you.
-
- Posts: 45
- Joined: Tue May 21, 2019 1:44 pm
Re: Add Custom Button/Group To Web Designer Toolbar
I would like to add an extra option (either button or menu item) that will allow to have a "Custom Save" function that I can call. Probably under the "File" toolbar group
I currently save my reports to a data table as a stream but would like the option to be able to save to a file as well.
I currently save my reports to a data table as a stream but would like the option to be able to save to a file as well.
-
- Posts: 7341
- Joined: Tue Mar 20, 2018 5:34 am
Re: Add Custom Button/Group To Web Designer Toolbar
Hello,
Please try to check the following code:
Thank you.
Please try to check the following code:
Code: Select all
<body>
<div onclick="aaa()">Load Report</div>
<form id="form1" runat="server">
<div>
<cc3:StiWebDesigner runat="server" ID="StiWebDesigner1" />
</div>
</form>
<script>
//where jsStiWebDesigner1 - "js" + designer ID
var toolBarRow = jsStiWebDesigner1.options.toolBar.firstChild.tr[0];
//Add images for custom buttons to designer images collection
jsStiWebDesigner1.options.images["ImageForCustomButton1"] = "https://www.stimulsoft.com/favicon.ico"; //For example
var customButton = jsStiWebDesigner1.StatusPanelButton("customButton1", null, "ImageForCustomButton1", null, null, 30, 30);
customButton.image.style.width = customButton.image.style.height = "16px";
var buttonCell = document.createElement("td");
buttonCell.className = "stiDesignerToolButtonCell";
buttonCell.appendChild(customButton);
toolBarRow.insertBefore(buttonCell, toolBarRow.childNodes[3]);
customButton.action = function () {
alert("Button clicked!");
}
</script>
</body>
-
- Posts: 45
- Joined: Tue May 21, 2019 1:44 pm
Re: Add Custom Button/Group To Web Designer Toolbar
That is working fine thanks
-
- Posts: 7341
- Joined: Tue Mar 20, 2018 5:34 am
Re: Add Custom Button/Group To Web Designer Toolbar
Hello
We are always glad to help you!
Thank you.
We are always glad to help you!
Thank you.