"joetesta" wrote:
"oliver9000" wrote:
thanks for your responses! @RokuChris, i think we're going to try your approach and have one initial xml feed with the categories populate the rows of a gridscreen. Then have each category kick off an async request for the xml feed containing the items of that row.
Hi oliver -
I'm working on a large grid and have it loading 5 rows at a time as the user scrolls down, which works, but it's buggy because the user can go down faster than the rows can load. I'm thinking about throwing up a "Retrieving" facade to make them wait while new rows load. But I'm looking around for a better option and wondering how this worked out for you - how do you continue to load rows while simultaneously listening for events? Do you do something to prevent them from scrolling down too fast or if they do then the rows eventually load so it's no big deal?
Thank you,
Joe
Many channels successfully use a combination of strategies to load grid content in a timely manner.
Instead of loading 5 rows at a time, set a non-zero timeout on your Wait() and load one row each time through the event loop when the Wait() times out and returns invalid. You could also use GetMessage() combined with a roTimespan to accomplish something similar.
At the same time that you're populating single rows without any user action, you can also listen for isListItemFocused to detect when the user scrolls to a given row and immediately populate that row (if it isn't already) and maybe the rows above and below it to fill in the screen depending on the grid style.
If you wanted to take it a step further, you could make the requests asynchronously. That way you wouldn't have to wait for the response to come back before you could handle the next event.