Links to subsequent pages are not working in pagination

            <table>
                <tr>
                <td>
                   <div><span id="infoArea"></span></div>
                </td>
                </tr>
                <tr>
                <td>
                   <!--div id="a_tabbar"-->
                           <div class="floatingWindowContent" id="walker1">
                           <div id="gridbox2" width="1600px"  height="300px" style="background-color:white;overflow:hidden"></div>
                           <div><span id="pagingArea"></span></div>
                   <!--/div-->
                </td>
                </tr>
                <tr>
                <td>
                   <!--div><span id="pagingArea"></span></div-->
                </td>
                </tr>
            </table>

          </td>
        </tr>
</table>

<script>
    var mygrid2 = new dhtmlXGridObject('gridbox2');
    mygrid2.setImagePath("/CustAdv/ts/bio/dhtml/dhtmlxGrid/codebase/imgs/");
    mygrid2.setColSorting("str,str,int,int,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str");
        mygrid2.enablePaging(true, 5, 4, 'pagingArea', true);
        mygrid2.init();
        mygrid2.setPagingSkin("bricks");
    mygrid2.setSkin('light');
        mygrid2.attachEvent("onBeforePageChanged", function(mygrid2) {
                if (!this.getRowsNum());
                        return false;
                        return true;
        });
        mygrid2.attachEvent("onBeforeSorting",function(){
           mygrid2.setPage(0);
           return;
        });
        mygrid2.loadXML("/cgi-bin/CustAdv/ts/bio/rep/rep1/xml/grid/re_page.pl?"+epochts, function() {
                mygrid2.sortRows(0, "str", "asc");
        });
</script>


Hello.

Please, pay attention about the attributes of the onBeforePageChanged event:
docs.dhtmlx.com/doku.php?id=dhtm … agechanged

grid.attachEvent("onBeforePageChanged", function(ind,count){});

Also, please, try to remove “;” after the if statement.
Please, try to use the following code:

mygrid2.attachEvent("onBeforePageChanged", function(ind,count) { if (!mygrid2.getRowsNum()) return false return true; });

Hi buddy,

The problem is solved.

Thanks a lot :slight_smile: