Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Oct 16, 2008 15:38
open dhtmlx forum
Paging - this._pgn_parentObj is null not an object

Hi
I am getting this._pgn_parentObj is null not an object error message. i have included all dhtmlxgrid paging js files still cannot resolve, please find my below code.

Thanks
Pranathi

    <link rel='STYLESHEET' type='text/css' href='codebase/dhtmlxgrid.css'>
    <link rel='STYLESHEET' type='text/css' href='codebase/dhtmlxgrid_pgn_bricks.css'>
    <script src='codebase/dhtmlxcommon.js'></script>
    <script src='codebase/dhtmlxgrid.js'></script>
    <script src='codebase/dhtmlxgrid_srnd.js'></script>
    <script src='codebase/dhtmlxgridcell.js'></script>
    <script src='codebase/dhtmlxgrid_pgn.js'></script>
    <script src='codebase/dhtmlxtreegrid.js'></script>

<script>
var mygrid;
    function doOnLoad(){
        
         mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("./codebase/imgs/icons_greenfolders/");
mygrid.setHeader("Column A, Column B");
mygrid.setInitWidths("100,100")
mygrid.setColAlign("left,left")
mygrid.setColTypes("tree,ro,");
mygrid.setColSorting("int,int")
            mygrid.enablePaging(true,10,5,"recinfoArea");
            mygrid.setPagingSkin("bricks");
            mygrid.init();
            mygrid.setSkin("light");
            mygrid.loadXML("big.xml");
    }
</script>
<body onload="doOnLoad();">
    
    <h1>Paging in dhtmlxTreeGrid</h1>
    <table width="500" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <div id="gridbox" width="100%" height="200px"></div>
            </td>
        </tr>
        <tr>
            <td id="recinfoArea"></td>
        </tr>
    </table>
Answer posted by Support on Oct 17, 2008 05:45
Such problem may appears if you have not defined object for paging info output or specified it incorrectly ( not existing id, specified before object rendered, etc. )

Your code have a small typo
       mygrid.setColTypes("tree,ro,");
must be 
       mygrid.setColTypes("tree,ro");
except of this - all works correctly while using code provided above in local samples