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.enableDragAndDrop(false);
mygrid.setImagePath("codebase/skins/terrace/imgs/");
doColumns("gridDataCompany");
mygrid.enableColumnMove(false);
mygrid.enablePaging(true, <?php echo $gridPageSize ?>, 5, "divGridContainerPagingContainer", "recinfoArea");
mygrid.setPagingSkin("toolbar", "dhx_terrace");
mygrid.enableAutoWidth(true, 525, 525);
mygrid.init();
mygrid.getFilterElement(0).value = currentCompany;
//mygrid.filterBy(0, currentCompany);
mygrid.filterByAll=function doFilter(){
<?php
$fieldArray = explode( ',', $gridFieldsList );
for ( $i = 0 ; $i <count( $fieldArray ); ++$i )
{
echo " mygrid.filterBy(" . $i . ",this.getFilterElement(" . $i . ").value,";
if ( $i == 0 )
{
echo "false";
}
else
{
echo "true";
}
echo ");" . PHP_EOL;
}
?>
};
document.onkeypress = function (oPEvt) {
if(oPEvt.charCode == '13' ){
mygrid.filterByAll();
}};
mygrid.load( "loadGrid.php?id=" + "gridDataCompany" );[/code]