In Grid 3.4, it is possible to pass messages from the server side handlers back to the Grid in the event of an error. This article will describe the steps to be taken by you, the developer, to make use of this feature.
On The Server Side
If an error is encountered on the server side and you wish to communicate this to the client side, you can set an error message through a function provided by the API:
Classic ASP: EBAGetHandler_SetErrorMessage(ErrorMessage) and EBASaveHandler_SetErrorMessage(ErrorMessage)
PHP: EBAGetHandler::setErrorMessage($message) and EBASaveHandler::setErrorMessage($message)
JSP: GetHandler.setErrorMessage(String message) and SaveHandler.setErrorMessage(String message)
On The Client Side
The Grid can access any errors generated by the get and save handlers by using the onhandlererrorevent attribute defined for the <ntb:grid> element. If an error message has been set on the server side, the handlererror event will fire.
To access the error message that was set by the handler, you can use the nitobi.data.DataTable.getHandlerError() method. E.g.
N.B.: Support for handler errors will be coming for .NET and CFM in the near future.
Comments:
Knowledgebase
To be notified of new articles when they're available, subscribe to our RSS feed.