Grid attachHeader filter not an object a.childNodes[b]

I am trying to replicate the sample code “Filtering in Smart Rendering Mode” of the below Link: … _srnd.html

I am reading a 1.5Mb XML file with the mygrid.load(“ClientData2”,“custom_xml”) and parsing without any errors.

The grid is showing OK, but if I add the line:
mygrid.attachHeader("#text_filter,#select_filter, ");

I get a error message ‘undefined’ is not an object (valuating ‘a.childNodes[b]’) on Safari Web inspector pointing to dhtmlxgrid.js file. The

I comment the line back and the error message disappears.

I though the XML could be corrupted and then tested the code by reducing the XML file size until it worked. At 20K it all filtered well. However, if I tested the parts I took out separately and they also worked. It seems it all depended on the size of the file.

Is it a bug or limitation on Grid filtering (attachHeader)?

Here is my code:

   <link rel="stylesheet" type="text/css" href="codebase/skins/dhtmlxgrid_dhx_skyblue.css">
   <script src="codebase/dhtmlxgrid_filter.js"></script>
   <script  src="codebase/dhtmlxgrid_srnd.js"></script>    

<script src="codebase/jquery.js" type="text/javascript"></script>

   var mygrid;
  function doInitGrid(){
		mygrid = new dhtmlXGridObject('mygrid_container');
		mygrid.attachHeader("#text_filter,#select_filter,&nbsp;"); //filter
		mygrid.getCombo(1).put(2, 2);   							//filter
		mygrid.setSkin("dhx_skyblue");								//filter
		mygrid.enableSmartRendering(true);							//filter

        	var rows = xml.doXPath("//Client");                     // get all row elements from XML
        	for (var i = 0; i < rows.length; i++){
            		var id = this.getUID();                  // XML doesn't have native ids, so custom ones will be generated
            		this.rowsBuffer[i]={                     // store references to each row element
                	idd: id,
                	data: rows[i],
                	_parser: this._process_custom_xml_row,   // cell parser method
                	_locator: this._get_custom_xml_data        // data locator method

            this.rowsAr[id]=rows[i];                // store id reference
        	this.render_dataset();                   // force update of grid's view after data loading

		mygrid._process_custom_xml_row=function(r, xml){

        var name = this.xmlLoader.doXPath("./name", xml)[0];        // get size sub-tag
        var city = this.xmlLoader.doXPath("./city", xml)[0];    // get mode sub-tag
        var country = this.xmlLoader.doXPath("./country", xml)[0];
        var strAr = [  
  if(typeof strAr === 'undefined' || strAr == null) {
  strAr = ["erro", "erro", "erro"];
        for (j=0; j < r.childNodes.length; j++) r.childNodes[j]._attrs={};

        this._fillRow(r, strAr);
        return r;

Please, open ticket at with the provided working complete demo.
Here you can find a tutorial: … leted_demo