Skip to main content
All docs
V25.1
  • MessageHandler Function

    Allows you to customize messages shown to the user.

    Declaration

    export const MessageHandler: DevExpress.Analytics.Internal.IGlobalSubscribableValue<IMessageHandler>

    Parameters

    Name Type
    newVal IMessageHandler

    Returns

    Type
    IMessageHandler

    Remarks

    Use the MessageHandler property to customize error messages shown to the user, as demonstrated in the following code snippet:

    DevExpress.Reporting.Viewer.Settings.MessageHandler.processError
        = function (message, showForUser, prefix) {
                DevExpress.Analytics.Internal.ShowMessage(prefix.substring(0, prefix.length - 2));
            };
    

    The picture below shows the Document Viewer, which attempts to load the “TestReport1” report whose data is corrupted. A custom error message is displayed:

    Web Document Viewer - Custom Error Message

    You can choose any approach to display notifications in your application.