[GRID] How to catch 'Incorrect XML' error?

When using grid I usually use following code

dhtmlxError.catchError(“LoadXML”, myErrorHandler);
function myErrorHandler(type, desc, erData){

return false;
}

to get rid of xml load errors when page is redirected during xml load. However this solution does not work
if I try using it with tree. It simply doesnt catch xml load error. Help!

You can try to use

dhtmlxError.catchError(“ALL”, myErrorHandler);
function myErrorHandler(type, desc, erData){

return false;
}
The tree generates two errors - LoadXML and DataStructure, so you need to handle both, or just use ALL as parameter.

Thank you. This was really helpful :slight_smile:
One problem was those two errors instead of one. But it correcting it did not solve the problem completely. I solved it by moving that snippet of code to the very bottom of .
Now it works like a charm