onDBError
The event occurs when some DB level error occurs, during data saving operations. It is relates to all operations: Insert, Update and Delete. It can be used to pass error info to the client side.
$conn->event->attach("onDBError",handlerFunc);
Parameters handlerFunc:
- $action - DataAction Object
- $exception - SQL related exception object
Availability:
- Available for Grid, TreeGrid, Tree, Scheduler, DataView, Form
Sample:
//adds new xml as a child of default <action> tag which is passed to client side as response function doOnDBError($action, $exception){ $action->set_response_xml("<errorinfo>".((String)$exception)."</errorinfo>") } $conn->event->attach("onDBError",doOnDBError);