0

Grid (changeDataset) retaining previous values?

I'm having a small problem where [grid].changeDataset() appears to NOT be clearing out the previous data. When it loads with a new dataset which doesn't have some of the items from the previous dataset, the previous items remain instead of being blank.

Just as an example - If I have this as item 0 in a data array (pseudocode):
[code]
olddata = [ title: 'Title1', date: 'July 31', summary: 'This is the first one' ]
newdata = [ title: 'Title2', summary: 'This is the second one']
[/code]

At this point, the view is displaying a grid populated with olddata. When I call:
[code]
[grid].changeDataset([])
[grid].changeDataset(newdata)
[/code]

- title and summary change, but date is still displayed.

by
2 Replies
  • hm - no preview anymore? My apologies - forgot how to do code tags & I don't see an option for it in the edit bar...

    QUOTE(Tony Garcia @ 2 Aug 2011 3:06 PM)
    I'm having a small problem where [grid].changeDataset() appears to NOT be clearing out the previous data. When it loads with a new dataset which doesn't have some of the items from the previous dataset, the previous items remain instead of being blank.

    Just as an example - If I have this as item 0 in a data array (pseudocode):
    [code]
    olddata = [ title: 'Title1', date: 'July 31', summary: 'This is the first one' ]
    newdata = [ title: 'Title2', summary: 'This is the second one']
    [/code]

    At this point, the view is displaying a grid populated with olddata. When I call:
    [code]
    [grid].changeDataset([])
    [grid].changeDataset(newdata)
    [/code]

    - title and summary change, but date is still displayed.
    0
  • Nevermind, figured it out.
    0

Recent Posts

in General - Yahoo! TV Widgets