Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by PY on Apr 14, 2008 18:26
open dhtmlx forum
Grid error handler

How to catch the "error type: cell" from grid?
Answer posted by Support on Apr 15, 2008 02:33
You can catch error and prevent error message by using default error handling routine.

function myErrorHandler(type, desc, erData){
    //custom code can be placed here
    return false;
}
dhtmlxError.catchError("cell", myErrorHandler);   // to handle incorrect cell error
or
dhtmlxError.catchError("ALL", myErrorHandler);   // to handle all possible errors
The array contains additonal data related to error
    erData=[xmlHttpRequest , object]

First element - xmlHttpRequest object, which contain all data requested
from server.
Second element - dhtmlx object, component which throw error while
loading.

You can get any additional error info by checking xmlHttpRequest
properties (xmlHttpRequest.responseText for example )