I have a grid that I load from the database:
If there is some sort of database error, I have some error handling that sends the back the relevant info in the XML.
<?xml version="1.0" encoding="utf-8"?>
<result status="error" />
<error errorNo="8134" errorDescription="Oops! Blah, blah, blah" />
The load may appear to be successful, just with zero rows being rendered.
However, I want to be able to look at the returned XML to determine if the status was “error” and then display an appropriate message to the user.
I was hoping the doAfterRefresh variant of load might help:
But doAfterRefresh doesn’t appear to provide access to the XML response such as when you use window.dhx4.ajax.get:
var x = r.xmlDoc.responseXML;
var result = x.getElementsByTagName("result").attributes;
var status = result.getNamedItem("status").nodeValue;
//display error dialog
So, is there a way for me to access the XML after the load is finished to achieve my error handling requirement?