Due to updateFromXML() shows wrong total record in dhtmlxgri

Let me explain how to load record in jsp page which used in my web apps.

-Grid initializing

mygrid = new dhtmlXGridObject(‘divItem’);
mygrid.preventIECashing(true);
mygrid.enableMultiline(true);
mygrid.setImagePath(“images/grid/”);
mygrid.setSkin(“clear”);
mygrid.enableAlterCss(“grid_even”, “grid_uneven”);
mygrid.enableRowsHover(true, “grid_hover”);
mygrid.enableColumnAutoSize(true);
document.getElementById(‘divPageFooter’).innerHTML = ‘’;
document.getElementById(‘divPageHeader’).innerHTML = ‘’;
mygrid.enablePaging(true, 100, 20, ‘divPageFooter’, true, ‘divPageHeader’);
mygrid.init();

-Need to show 100 record per page.

1) so first we load 20 record and xml which generate from server side and used in jsp.
mygrid.loadXMLString("<c:out value=’${sheetRecord}’ escapeXml=‘false’/>")

total record count set in xml and this time it will show 10400 record in “divItemPageHeader”

2) Now manually request for 80 record
var xmlURL = “action to retrieve xml”
mygrid.updateFromXML(xmlURL,true,false,Function());

Now problem is that after 2nd call it will show wrong total count in header.
10480 record in “divItemPageHeader”

As per my understanding, first 20 record will load from server side variable and then manually call for 80 record.

so i think grid updates total count based on how many row added in grid.
i.e, Before 20 row already loaded and after 80 row will add in grid so might be it possible that add 80 row in total record count.

Please help to solve this.

Unfortunately it is not available to use the updateFromXML() method in this case.
Please, try to use the onDynXLS event with load method.