I have a DS-backed ListGrid. It is 10 rows high. 20 rows are returned from the DS on the first view, but the ListGrid.createRecordComponent () method is only called for the first 16 rows.
This seems reasonable at first, since rows 11-20 are out of view. But, when you scroll down to the last 10 rows, it is still not called, resulting in empty cells. It’s not throwing warnings or errors, and I confirmed with the debugger that it’s not being called, rather than just returning a blank canvas. Can anyone help with this issue?
I tried the latest nightly build, and the issue is still there. (I since found out we were using 2.4 anyway).
I did find out something else interesting: if I have the DS return 100 rows, not 20, the grid makes two calls. It gets rows 0 to 75, and then 76 to 100, all before the user has scrolled down at all from seeing the first 10. And in this instance, all 100 rows have the components drawn. This seems like it narrows the issue down a bit. Can any of you experts out there shed light on this?
Edit: any number of totalRows over 76, that causes 2 or more calls to the DS, results in the components painting properly.
I figured it out - I was doing setShowAllRecords(true) on the ListGrid.
It’s behaving normally now, except for one thing: it leaves blank space at the end of the rows, when scrolling.
For example, my viewport is 10 rows deep. I have 20 rows shown. The scrollbar however is sized at about a third of the height, as though it’s sized for 30 rows. Sure enough, you scroll all the way down, and the last row is shown at the top of the ListGrid, with blank space below. Is this normal?
Hi,
Try to add ListGrid.draw() method at the end when u set all other properties of ListGrid.Remember this must be the last property to set.Set all other properties before this.