PDA

View Full Version : Grid data not displaying



mharry
16 Jun 2009, 8:52 AM
I have a grid that I populate with data retrieved remotely. The grid also has a pagingToolbar associated with it. Everything works perfectly if the panel containing the grid is instantiated when the app starts and then I navigate to the "page" that displays the grid later. However, I'm trying to delay creating the grid and retrieving the data until the user navigates to that page.

To do this, I'm using a View which gets created at app start time, but the panel that the view will display is constructed in the initialize method of the View, thus delaying it until the View is handling the first event to display it.

The problem I'm running into is that no data shows in the grid when I do it this way. I've confirmed that everything it still functioning the exact same way, the data is being retrieved and the paging tool bar is even displaying correctly show the right number of pages and making appropriate calls to the server side to move through the data set. But there are no rows in the grid itself.

Any help would be greatly appreciated.

mharry
23 Jun 2009, 8:00 PM
I eventually figured this one out... the issue was that I didn't use setAutoHeight(true). Since the data is being retrieved from a remote source there is a lag. If the grid gets rendered before the data comes back it sets the height to display no rows. Once the data finally arrives the grid stays the same height even though it actually has rows in it.

When I did the instantiation of the grid page before viewing it, there was time to retrieve the data and the rows and then set the appropriate size before it was ever rendered.