Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Lucian Constantin on Nov 19, 2007 07:10
open dhtmlx forum
dhtmlXGridFromTable paging

Can we apply paging to a grid generated based on a table?

I tried to do this modifying the dhtmlxgrid_start.js file, adding the following line before the windowf.init() method call:
windowf.enablePaging(true, 5, 2, "pagingArea", true, "recinfoArea" );

where var windowf = new dhtmlXGridObject(w);

I have pagingArea and recinfoArea defined as two div elements on my html page.
Answer posted on Nov 19, 2007 08:12
It is possible , but it will not give any performance advantage, it take the same time for initial loading as grid in normal mode


        function startA () {
            mygrid.enablePaging(true, 2, 2, "pagingArea", true, "recinfoArea" );
        }
        function startB () {
            mygrid.setSizes();
            mygrid.currentPage=0;
            mygrid.changePage(1)
        }       
    </script>
    <div id="pagingArea"></div>
    <div id="recinfoArea"></div>
   <table class="dhtmlxGrid" imgpath="../../codebase/imgs/" style="width:400px" name="mygrid" onbeforeinit="startA()" oninit="startB()">