View Full Version : getRange Issues

20 Nov 2011, 7:09 AM
Hi I am trying to load a set range of items from a store into a dataview but it seems getRange() breaks something in the store. Does anyone know a solution to this?

var recordsforpage = myStore.getRange();
// create a new component which will use the paged data
var carouselpage = Ext.create('Ext.DataView', {
loadingText: '',
itemSelector: 'mainButtonsWrapper',
store: recordsforpage,
itemTpl: '<div class="mainButtonsWrapper"><div class="thumb"><div class="thumb-name">{Description}</div>'


I tried a simple example. If I add myStore to store: everything works fine, however if I add recordsforpage( myStore.getRange() ) it breaks. Doesn't getRange() return the specified records in myStore, so shouldn't myStore be equivalent to myStore.getRange()?

20 Nov 2011, 7:49 AM
Well, I created a new store then added recordsforpage to it. Then I loaded the new store into my dataview and everything worked.