Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Question about listgrid and dynamic fetch.

    Hi,

    i have listgrids where i want them to load dynamically when user scrolls down. To avoid having to count total rows every time, i just check if returned rows is equal to requested rows. If it is, i just set totalrows to (endRow + dataSize). This has worked well.

    When trying a new function, i did the above, but instead of adding datasize to the total rows, i just added +1. So the formula was this:

    when fetching row 0-75, total rows returned from server was 76 instead of my "normal" value of 150. Next time the total rows would be 151 instead of the normal 225 etc.

    I noticed that this had a strange side-effect. Even though only 22-23 rows were visible on-screen in the ListGrid, whenever i load the page, two fetch requests are triggered at once. First 0-75 and then 75-150.
    If i change back the "total rows-calculation" to endrow + 75, it goes back to only fetching the first 75.

    To me, this is very peculiar. Is this really expected behaviour? Using 6.0-p20171202 at the moment.

    #2
    This kind of double-fetch can sometimes happen due to drawAhead settings combined with a misbehaving server: the client grid is trying to render rows offscreen and the server has been set up to return only up to a maximum number of rows, forcing the grid to request more rows immediately.

    That explanation doesn't make sense with what you describe, but then, you explanation isn't making much sense yet - it seems to imply that the grid is asking for rows that it knows are past the end of the data? We've never seen that behavior, and the code there is really simple. We'd need to see a test case.

    Comment


      #3
      Yeah, i've also seen that double fetch in the past, because of what you described. Precisely, it seems the grid asks for way more rows than can fit on-screen, that's why i thought it was strange.

      Ok, well i'll try to get around to do a test-case...

      Comment

      Working...
      X