All docs
V21.1
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DxDocumentViewerCallbacks Class

Specifies client-side event handler functions for the Web Document Viewer. See DxDocumentViewerCallbacks Members for the complete list of events.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v21.1.JSBasedControls.dll

Declaration

public class DxDocumentViewerCallbacks :
    SettingsComponent<DocumentViewerCallbacksModel>

Remarks

The DxDocumentViewerCallbacks class contains properties that specify JavaScript handler functions for client-side events.

View Example: Blazor Reporting - UI Customization API

You can define a global JavaScript function in an external script file and add the file reference to the page. The following example handles the BeforeRender event to specify the Document Viewer’s zoom level:

  1. Create a JavaScript file in the project’s wwwroot/js folder. Write the following code:

    window.ReportingViewerCustomization = {
        //Change default Zoom level
        onBeforeRender: function(s, e) {
            //-1: Page Width
            //0: Whole Page
            //1: 100%
            e.reportPreview.zoom(-1);
        }
    }
    
  2. Include the script file in the host page:

    <script src="~/js/reporting_ViewerCustomization.js"></script>
    
  3. Set the DxDocumentViewerCallbacks.BeforeRender property to the function name:

    <DxDocumentViewer ReportName="SampleReport" Height="1000px" Width="100%">
        <DxDocumentViewerCallbacks BeforeRender="ReportingViewerCustomization.onBeforeRender" />
    </DxDocumentViewer>
    

Inheritance

Object
ComponentBase
DevExpress.Blazor.Reporting.Base.SettingsComponent<DevExpress.Blazor.Reporting.DocumentViewerCallbacksModel>
DxDocumentViewerCallbacks
See Also