I add custom button in MVC by following code:
Code: Select all
var userButton = jsMvcViewer1.SmallButton("userButton", "My Button", "emptyImage"); // (name, captionText, imageName, toolTip, arrow, styleName);
userButton.image.src = "http://files.stimulsoft.com/images/about.png";
userButton.action = function () { alert("My Button Event"); }
var toolbarTable = jsMvcViewer1.controls.toolbar.firstChild.firstChild;
var buttonsTable = toolbarTable.rows[0].firstChild.firstChild;
var userButtonCell = buttonsTable.rows[0].insertCell(0);
userButtonCell.className = "stiMvcViewerClearAllStyles";
userButtonCell.appendChild(userButton);