0

Refreshing Pages / Back Button

I am having trouble re filling my grids after a user navagates back to the previous page then foward again. When the user reaches the page they just recently visited but with a different option, the grid just gets put overtop of the old grid.

Here is some of the code I'm using:

this.refreshGrid = function() {
menuContainer3.removeChild(this.cityGridList);
menuContainer3.remvoeChild(this.cityGridListIndic);

//other code to repopulate grid lists)

}
this.refreshGrid();

This does not seem to remove the previous FillGrid just pasting over it.
What am I doing wrong? Any Ideas?

by
3 Replies
  • The issue is that you shouldn't be removing the old grid, but rather changing the dataset on it. If you call [grid].changeDataset(newDataset) the grid will update itself with the new data and you will not only get the intended result, but also be much higher performance.
    0
  • Thanks for this solution, I'm working with it right now. Some problems arise, is there a way to change events such as onSelect after I update the dataSet. I also need to change the pageIndicator, there is an update method for that but it does not seem to meet my needs. Any suggestions for that as well?
    0
  • QUOTE (scottagarman @ Mar 31 2009, 06:24 AM) <{POST_SNAPBACK}>
    Thanks for this solution, I'm working with it right now. Some problems arise, is there a way to change events such as onSelect after I update the dataSet. I also need to change the pageIndicator, there is an update method for that but it does not seem to meet my needs. Any suggestions for that as well?


    Can you send me a code sample of what you are doing? I'd be happy to shoot back an email with suggestions once I see your code.
    0

Recent Posts

in General - Yahoo! TV Widgets