Issue with grid filtering and paging

I am trying to display a grid in a dhtmlxWindow. The grid has two columns that can be filtered. Using the code below, the grid appears and populates; however, only the first column filters and the paging toolbar does not appear. An error occurs each time the data is filtered - Uncaught TypeError: Cannot read property ‘childNodes’ of null. I’m not sure what is causing this error or how I can fix it. Could you help me figure out what is wrong with my code? Thanks!

[code] mygrid = dhxtmlWindow.attachGrid();

            mygrid.setSkin( "dhx_terrace" );


            mygrid.enablePaging(true, <?php echo $gridPageSize ?>, 5, "divGridContainerPagingContainer", "recinfoArea");
            mygrid.setPagingSkin("toolbar", "dhx_terrace");
            mygrid.enableAutoWidth(true, 525, 525);
            mygrid.getFilterElement(0).value = currentCompany;
            //mygrid.filterBy(0, currentCompany);

            mygrid.filterByAll=function doFilter(){

               $fieldArray = explode( ',', $gridFieldsList );
               for ( $i = 0 ; $i <count( $fieldArray ); ++$i )
                   echo "    mygrid.filterBy(" . $i . ",this.getFilterElement(" . $i . ").value,";
                   if ( $i == 0 )
                       echo "false";
                       echo "true";
                   echo ");" . PHP_EOL;

            document.onkeypress = function (oPEvt) {

                if(oPEvt.charCode == '13' ){


            mygrid.load( "loadGrid.php?id=" + "gridDataCompany" );[/code]

As you are attaching your header with the filter in the xml please, try to call:
mygrid.getFilterElement(0).value = currentCompany;
after the xml is loaded to the grid:
mygrid.load( “loadGrid.php?id=” + “gridDataCompany”,function(){
mygrid.getFilterElement(0).value = currentCompany;

and the paging toolbar does not appear
Please, check if the “divGridContainerPagingContainer” container is on your page.

If the problems still occur for you please, provide with a complete demo, where it can be reconstructed.
Here you can find a tutorial about creating a complete demo: … pport.html