PDA

View Full Version : List not starting at top when loading data



gary7au
6 Dec 2010, 3:24 AM
I have a list that I load with Categories..

The Problem
=========
1. Load a large set of data into the list using the loadData method.
this.getComponent('categories').getStore().loadData(largeDataSet, false);

2. Scroll to the last item in the list.

3. Load a new, smaller, set of data into the list.
this.getComponent('categories').getStore().loadData(smallDataSet, false);

The problem I have is that the second loading of the list does not show any data. The data has successfully loaded but it seems to have remembered the scroll position from the first data set.

Any help here would be greatly appreciated.

Cheers

mrsunshine
6 Dec 2010, 4:26 AM
Did you tried to call the refresh() method on the Ext.List instance?

gary7au
6 Dec 2010, 4:28 AM
Hi mrsunshine,

Yep just tried that now thanks, and it works.

Thanks for your prompt reply

Cheers