MessageHandler Function
In This Article
Allows you to customize messages shown to the user.
#Declaration
TypeScript
export const MessageHandler: DevExpress.Analytics.Internal.IGlobalSubscribableValue<IMessageHandler>
#Parameters
Name | Type |
---|---|
new |
IMessage |
#Returns
Type |
---|
IMessage |
#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: