dhtmlxTreeGrid 'parse' function throws an exception in IE 11

Dear Sir/Madam,

I recently came across a bug in dthmlxTreeGrid which prevents the grid from loading properly in IE 11. We are using version 4.1.2 of the professional edition of the dhtmlxSuite.

The particulars are as follows:

  1. The problem occurs only in IE. Chrome and Firefox do not suffer from this issue.

  2. The exception is thrown when the ‘parse’ function is called on the dhtmlxTreeGrid object and the parsed object is an Xml string or a jQuery XML Http Response.

  3. The data format argument specified when calling the ‘parse’ function is ‘xmlA’.

  4. The exception message is ‘Object doesn’t support property or method ‘selectNodes’’.

  5. The callstack:

    window.dhx4.ajax.xpath [dhtmlx.js]
    dhtmlXGridObject.prototype._parseHead [dhtmlx.js]
    dhtmlXGridObject.prototype._parseHead [dhtmlx.js]
    dhtmlXGridObject.prototype._process_xmlA [dhtmlx.js]
    dhtmlXGridObject.prototype.parse [dhtmlx.js]

  6. The offending code:

     xpath:function(e,a)
     {
          if(dhx4.isIE)
          {
              return a.selectNodes(e)||[]
          }
          else
          {
              //Non-IE code here...
          }
    

If instead an XMLDocument object is passed to the parse method, a different exception occurs. In this alternative case:

  1. The exception message is: ‘Object doesn’t support property or method ‘replace’’.

  2. The call stack is as follows:

    window.dhx4.ajax.parse [dhtmlx.js]
    window.dhx4.ajax.xmltop [dhtmlx.js]
    dhtmlXGridObject.prototype._process_xmlA [dhtmlx.js]
    dhtmlXGridObject.prototype.parse [dhtmlx.js]

  3. The offending code:

     parse:function(a){a=a.replace(/^[\s]+/,"");
    

Hopefully this provides enough information for you to reproduce and resolve the issue.

Thank you.

Please, open ticket at support.dhtmlx.com to get the latest fixed version of the dhtmlx.