Check documentation for the latest version of dhtmlxSuite onDBError DHTMLX Docs

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:

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);
Back to top