Forum /
Ext JS Community Forums 4.x /
Ext: Q&A /
Unanswered: Infinte grid is not working with arrayStore
Unanswered: Infinte grid is not working with arrayStore
Hi,
I am creating infinite grid in my application. If i use Ext.data.store in grid, then data is rendered in grid. If i use Ext.data.ArrayStore then data is not rendered in grid. please give me solution for this issue. It is too urgent. I have included my code with this mail.
Ext.onReady(function(){
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
'name', 'userId'
]
});
// create the Data Store
var store = Ext.create('Ext.data.ArrayStore', {
model: 'User',
remoteGroup: true,
buffered: true,
leadingBufferZone: 76,
pageSize: 38,
proxy: {
type: 'jsonp',
url: 'http://localhost:8080/app/index1.jsp',
reader: {
root: 'resultData',
type:'json',
totalProperty: 'totalCount'
},
},
autoLoad: true,
listeners: {
}
}
});
var grid = Ext.create('Ext.grid.Panel', {
width: 700,
height: 500,
collapsible: true,
title: Infinite grid',
store: store,
loadMask: true,
selModel: {
pruneRemoved: false
},
multiSelect: true,
viewConfig: {
trackOver: false
},
verticalScroller:{
variableRowHeight: true
},
// grid columns
columns:[
{
xtype: 'rownumberer',
width: 50,
sortable: false
},
{
tdCls: 'x-grid-cell-topic',
text: "name",
dataIndex: 'name',
flex: 1,
sortable: true,
hideable: false
},{
text: "userId",
dataIndex: 'userId',
width: 100,
sortable: true,
hidden: false,
hideable: false
}],
renderTo: Ext.getBody()
});
});
Thanks & Regards
Saravanan
Sencha - Ext JS Dev Team
You use an ArrayStore, but give it a URL?
The purpose of an ArrayStore is to use a javascript array as the data.
If you give it a Proxy with a URL, it is not an ArrayStore.
BTW, you do know how to generate a response for JSONP proxy as opposed to a JSON proxy don't you?
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us