Problem with paging

Hello,
I have one problem trying to enable paging on my grid. When I load the data to the grid and set paging (e.g. 100 rows per page), first page shows all the rows (around 46.000 in current case), the rest of pages show 100 rows as expected but with one empty

element at the end that fills up the rest of space with blank.
Only the last page shows results as expected!

Here’s the part of code I’m using for defining the grid:

<link href="<%= Skin.Root("css/dhtmlxgrid_dhx_skyblue.css") %>" rel="stylesheet" type="text/css" />
<link href="<%= Skin.Root("css/dhtmlxgrid.css") %>" rel="stylesheet" type="text/css" />

<script src="<%= Skin.Root("Scripts/jquery-1.6.2.min.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/jquery-ui-1.8.15.custom.min.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/xcombogrid.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/dhtmlxcommon.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/dhtmlxgrid.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/dhtmlxgridcell.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_srnd.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_filter.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_validation.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_nxml.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_pgn.js")%>" type="text/javascript"></script>
<script src="<%= Skin.Root("Scripts/JavaGrid/ext/dhtmlxgrid_splt.js")%>" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function () {
    dgvCompare.setImagePath('../Scripts/JavaGrid/imgs/');
    dgvCompare.setHeader('ID,coltype,RefNr 1,RefNr 2,RefNr 3,Description,Factory,Factory number,Price,Price,Factory number,Factory,Description,RefNr 3,RefNr 2,RefNr 1,Difference %');

    dgvCompare.setInitWidthsP('0,0,0,0,0,11,11,12,12,12,12,11,11,0,0,0,8');
    dgvCompare.setColTypes('ro,ro,ro,ro,ro,ro,ro,ro,ron,ron,ro,ro,ro,ro,ro,ro,ro');
    dgvCompare.setNumberFormat('0,000.00', 8, ',', '.'); 
    dgvCompare.setColSorting('str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,int');
    dgvCompare.setColAlign('left,left,left,left,left,left,left,left,right,right,left,left,left,left,left,left,right');
    dgvCompare.setSkin('dhx_skyblue');

    dgvCompare.init();

    dgvCompare.enablePaging(true, 50, 10, 'pagingArea', true, 'infoArea');
    dgvCompare.setPagingSkin('bricks');
    dgvCompare.enableCellIds(false);
    dgvCompare.enableSmartRendering(false);

    dgvCompare.attachFooter("<div style='border:none'><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='border:none'><div id='rowcount' style='float:left; width:25%; text-align:left'></div><div id='averagediff' style='float:left; width:25%; text-align:left'></div><div id='pricedown' style='float:left;padding-right:10px;'></div><div id='priceup' style='float:left;padding-right:10px;'></div><div id='sameprice' style='float:left;'></div><div id='totalcount' style='float:right; width:25%' ></div></td></tr></table></div>,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan");

    dgvCompare.clearAll();
    dgvCompare.parse(document.getElementById('dgvCompare_xml').value);
});
</script>

and I load the data using following function:

renderCrossGrid = function (filtered, limitToNumber) {
            $.post('/Compare/GetData', { filter: filtered}, function (data) {
                    dgvCompare.clearAll();
                    dgvCompare.loadXMLString(data.data);
                }, "json");
            });
        }

Does anyone have an idea what I’m doing wrong? How can I solve this issue?
BTW, I’m using v.2.6 build 100722, and I’ve also tried it on new 3.5 version, but the result is the same.

Thanks!

Unfortunately the issue cannot be reconstructed locally.

Please, provide a complete demo where the issue can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

Unfortunately, I can’t create demo project in which this could be reconstructed.
When I isolate the code from the project and put it in one HTML file, it seems to be working OK, but when it is called from the project it won’t work.
Any suggestions where I should look for a problem?

OK, I’ve managed to solve the problem.

The controller that I’ve been using for returning XML data for loading data called the command “enableSmartRendering” with “true” value, so smart render in combination with pagination created the problem…

Thanks anyway :slight_smile:
Miljan