This is a migrated thread and some comments may be shown as answers.

report viewer - Use Javascript selector instead of JQuery selector

1 Answer 235 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Bharat
Top achievements
Rank 1
Bharat asked on 03 Apr 2019, 05:40 AM

In the html5 report viewer, we are using a jquery selector

 $("reportViewer").telerik_ReportViewer({...});

But what if we want to use vanila javascript selector for it like,

 document.getElementById("reportViewer").telerik_ReportViewer({...});

but when I am using this it is showing me an error: Uncaught TypeError: reportViewer1.telerik_ReportViewer is not a function

 

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 05 Apr 2019, 09:32 AM
Hello Bharat,

The HTML5 Report Viewer is a pure HTML5/JavaScript/CSS3 jQuery-based widget and in its implementation uses jQuery objects. For example, telerik_ReportViewer, telerik_ReportViewer_SendEmail, telerik_ReportViewer_PagesArea, telerik_ReportViewer_DocumentMapArea, telerik_ReportViewer_ParametersArea etc.

You could write your custom vanilla JavaScript logic in telerikReportViewer-<VERSION>.js for the viewer in order to use the document.getElementById selector.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
Bharat
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or