To change the message, use the following code in the AfterAdd, AfterEdit or BeforeDisplay events:
Example 1
Change the error message in case of the error. You can do this in BeforeDisplay event.
if (pageObject.getMessageType() == Constants.MESSAGE_ERROR) {
pageObject.setMessage("My error message");
}
This is how the result looks like:
Example 2
Change the 'success' message:
pageObject.setMessageType(Constants.MESSAGE_INFO);
pageObject.setMessage("The data was successfully saved");
See also:
•Grid Row JavaScript API: row.setMessage()
•Display a message on the Web page
•Master-details relationship between tables