Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Client side Rows.length is not always correct
posted

I'm using LoadOnDemand="xml" to load the rows as the user scrolls and handling AfterXmlHttpResponseProcessed on the client side so that I can show the user how many rows have been downloaded and how many available rows on the server.  The following is my event handler

 function AfterXML(gridName)
{
    var grid=igtbl_getGridById(gridName);
    document.getElementById('status').innerHTML='Loaded ' + grid.Rows.length + ' of ' + grid.RowsServerLength;
}

I've noticed with the RowsRange set to 200 and about 250 items on the server when I scroll down to the bottom it gets the remaining 50 but the Rows.length in the event is 400 not 250.  BTW I'm using 2007 v3.  For now I just check for this and use the RowsServerLength if Rows.Length is greater than RowsServerLength