Page 1 of 1

remove save to "HTML file" from Export options

Posted: Tue Apr 04, 2017 8:35 pm
by jcmmde
I can't seem to get the "HTML File" off the Save Menu drop down in the viewer.

Code: Select all

var options = new Stimulsoft.Viewer.StiViewerOptions();
options.height = "100%";
options.appearance.scrollbarsMode = true;
options.toolbar.showDesignButton = true;
options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
options.toolbar.showAboutButton = false;
options.exports.showExportToPdf = false;
options.exports.showExportToWord2007 = false;
options.exports.showExportToDocument = false;
options.exports.showExportToHtml = false;
Thanks...

Re: remove save to "HTML file" from Export options

Posted: Thu Apr 06, 2017 7:49 am
by HighAley
Hello.

There are two exports (HTML and HTML5) are joined in this menu item.
Please, disable both items:

Code: Select all

options.exports.showExportToHtml = false;
options.exports.showExportToHtml5 = false;
Thank you.

Re: remove save to "HTML file" from Export options

Posted: Thu Apr 06, 2017 7:48 pm
by jcmmde
That worked great for the viewer. Thanks!

Any way to control those same options for the "Preview" window in the Designer?

Re: remove save to "HTML file" from Export options

Posted: Fri Apr 07, 2017 10:48 am
by HighAley
Hello.

This task will be a little harder to solve.
You could use next code to hide the exports:

Code: Select all

var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.renderHtml("content");

var viewer = designer.jsObject.options.viewerContainer.firstChild;
viewer.jsObject.controls.menus.saveMenu.items["Html"].style.display = "none";
viewer.jsObject.controls.menus.saveMenu.items["separator2"].style.display = "none";
Thank you,

Re: remove save to "HTML file" from Export options

Posted: Mon Nov 18, 2019 3:30 pm
by ADev2000
I am not able to remove data file export option. Is this the right property?

options.exports.showExportToDocument = false;

Re: remove save to "HTML file" from Export options

Posted: Tue Nov 19, 2019 10:33 pm
by Lech Kulikowski
Hello,

To remove Data exports, you should hide CSV, XML, JSON exports.

Thank you.