Hi,
I am using Q1 reporting with ASP. Specifically, I have created a report within a radwindow which works well, however, you can right click anywhere on the preview and it brings up the full IE quick menu.
I tried to remove this by adding the basic javascript code to disable right clicking but it worked outside of the report but not on the report itself.
Is there any way of restricting the right mouse click?
Thanks,
Jon
I am using Q1 reporting with ASP. Specifically, I have created a report within a radwindow which works well, however, you can right click anywhere on the preview and it brings up the full IE quick menu.
I tried to remove this by adding the basic javascript code to disable right clicking but it worked outside of the report but not on the report itself.
Is there any way of restricting the right mouse click?
Thanks,
Jon
4 Answers, 1 is accepted
0
Accepted
Hi JK,
At this moment there is no way to disable the context menu in the report area. It renders as an iframe element and you cannot add custom javascript code to the document which is shown there. We will put down your request and will try to think of a possible solution for achieving this functionality.
Let us know if other questions/problems come to mind.
Best wishes,
Chavdar
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
At this moment there is no way to disable the context menu in the report area. It renders as an iframe element and you cannot add custom javascript code to the document which is shown there. We will put down your request and will try to think of a possible solution for achieving this functionality.
Let us know if other questions/problems come to mind.
Best wishes,
Chavdar
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
AJ
Top achievements
Rank 1
answered on 22 Mar 2012, 03:53 PM
Has there ever been any update to this? I'm finding that some people are right clicking the report and going to print and it's coming out as blank pages.
0
Accepted
Hello AJ,
You can easily achieve this with the help of some javascript:
Kind regards,
Steve
the Telerik team
You can easily achieve this with the help of some javascript:
<
telerik:ReportViewer
ID
=
"ReportViewer1"
runat
=
"server"
/>
<
script
type
=
"text/javascript"
>
ReportViewer.prototype.OnReportLoadedOld = ReportViewer.OnReportLoaded;
ReportViewer.prototype.OnReportLoaded = function () {
this.OnReportLoadedOld();
var reportFrame = document.getElementById(this.reportFrameID);
var reportDocument = reportFrame.contentWindow.document;
var body = reportDocument.getElementsByTagName("body")[0];
body.oncontextmenu = function () { return false; };
}
</
script
>
Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
AJ
Top achievements
Rank 1
answered on 29 Mar 2012, 05:38 PM
That was easy. Thanks!!!!