Code: Select all
@{
ViewBag.Title = "Stimulsoft Reports.Web Demo";
}
@Html.StiNetCoreViewer("StiNetCoreViewer", @ViewBag.ViewerOptions as StiNetCoreViewerOptions)
<script type="text/jscript">
var userButton = jsStiNetCoreViewer.SmallButton("userButton", "My Button"); // (name, captionText, imageName, toolTip, arrow, styleName);
userButton.action = function () { alert("My Button Event"); }
var toolbarTable = jsStiNetCoreViewer.controls.toolbar.firstChild.firstChild;
var buttonsTable = toolbarTable.rows[0].firstChild.firstChild;
var userButtonCell = buttonsTable.rows[0].insertCell(0);
userButtonCell.className = "stiMvcViewerClearAllStyles";
userButtonCell.appendChild(userButton);
</script>