Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MessageHandler Function

Allows you to customize messages shown to the user.

#Declaration

TypeScript
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: