Hi
We are evaluating your asp.net core reporting component.
How can I add a custom button from js, to the designer on a razor page and then execute an action.
Any example code is appreciated.
Thanks
custom button in asp.net core designer
-
- Posts: 7351
- Joined: Tue Mar 20, 2018 5:34 am
Re: custom button in asp.net core designer
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
<script type="text/javascript">
jsStiNetCoreDesigner1.onready = function () {
var homePanel = jsStiNetCoreDesigner1.options.homePanel;
var buttonsGroup = jsStiNetCoreDesigner1.GroupBlock("buttonsGroup1", "Group1");
var buttonsGroupTable = jsStiNetCoreDesigner1.GroupBlockInnerTable();
buttonsGroup.container.appendChild(buttonsGroupTable);
var customBigButton = jsStiNetCoreDesigner1.BigButton("customButton1", null, "Custom Button", " ", "Tooltip for customButton1");
customBigButton.image.src = "https://www.stimulsoft.com/images/blocks/ultimate-buttons/logo.png";
buttonsGroupTable.addCell(customBigButton).style.padding = "2px";
customBigButton.action = function () {
alert("customButton was pressed!");
}
homePanel.firstChild.addCell(buttonsGroup);
homePanel.firstChild.addCell(jsStiNetCoreDesigner1.GroupBlockSeparator());
}
</script>
Re: custom button in asp.net core designer
Hello,
And how do you add button to be the first not the last as the above script suggests?
Thank you
And how do you add button to be the first not the last as the above script suggests?
Thank you