Is Parameters Area Visible HTML5 ReportViewer

3 posts, 0 answers
  1. Justin
    Justin avatar
    12 posts
    Member since:
    Aug 2006

    Posted 02 Feb 2016 Link to this post

    How can I determine if the Parameters Area is visible on the HTML5 ReportViewer using javascript?

    I know how to toggle it but I need to check if it is visible first before toggling.

  2. Nasko
    Nasko avatar
    941 posts

    Posted 04 Feb 2016 Link to this post

    Hello Justin,

    The HTML5 Report Viewer exposes all its available commands through the commands collection.
    Each command is an object, with the exec() method being the one that actually triggers the command. The other two methods, enabled() and checked() return a bool value and can be used prior to executing a command or to find in what state the UI for the command should be.
    The toggleParametersArea shows or hides the parameters area and can be used in the described scenario to check if the parameter area is already enabled or not:
    var reportViewer = $("#reportViewer1").data("telerik_ReportViewer");
    if (reportViewer.commands.toggleParametersArea.checked()) {

    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
  3. Justin
    Justin avatar
    12 posts
    Member since:
    Aug 2006

    Posted 15 Feb 2016 in reply to Nasko Link to this post

    I found .hasClass on the ParametersArea div to be a more reliable way of checking.  I kept getting inconsistent results back with the .checked() on the command object.           

            serviceUrl: "/api/reports/",
            viewMode: "INTERACTIVE",
            scaleMode: "SPECIFIC",
            reportSource: {
                report: reportClass,
                parameters: {
                    CultureID: "en"
            renderingEnd: function () {
Back to Top