The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebDocumentViewerClientSideEventsBuilder.CustomizeLocalization(String) Method

Sets the name of the JavaScript function or the entire code that will handle the Web Document Viewer's CustomizeLocalization client-side event.

Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll

Declaration

public WebDocumentViewerClientSideEventsBuilder CustomizeLocalization(
    string callback
)
Public Function CustomizeLocalization(
    callback As String
) As WebDocumentViewerClientSideEventsBuilder

Parameters

Name Type Description
callback String

The name of a JavaScript function or the entire JavaScript function code used to handle the CustomizeLocalization event.

Returns

Type Description
WebDocumentViewerClientSideEventsBuilder

A WebDocumentViewerClientSideEventsBuilder that can be used to further configure the Document Viewer Client Side Events.

Remarks

The CustomizeLocalization event enables you to localize the Web Document Viewer. Use the event argument's LoadMessages method to load JSON files obtained from the DevExpress Localization Service.

<script type="text/javascript" id="script">
    function CustomizeLocalization(s, e) {
        e.LoadMessages($.get("/dx-analytics-core.de.json"))
        e.LoadMessages($.get("/dx-reporting.de.json"))
    } 
</script>

@(Html.DevExpress().WebDocumentViewer("webDocumentViewer")
    .ClientSideModelSettings(x => x.IncludeLocalization = false)
    .ClientSideEvents(x => x.CustomizeLocalization("CustomizeLocalization"))
    .Height("1000px")
    .Bind("Report")) 

See the Localization topic for more information.

See Also