PDA

View Full Version : paging



krey
16 Oct 2009, 12:23 AM
Hello all,
i cant make paging. Why did not work correctly this code?

Ext.onReady(function(){
var someData = [
[1, "vasea"],[2, "vasea"],[3, "vasea"],[4, "vasea"],[5, "vasea"],[6, "vasea"],[7, "vasea"],
[8, "vasea"],[9, "vasea"],[10, "vasea"],[11, "vasea"],[12, "vasea"],[13, "vasea"],[14, "vasea"],
[15, "vasea"],[16, "vasea"],[17, "vasea"],[18, "vasea"],[19, "vasea"],[20, "vasea"],[21, "vasea"],
[22, "vasea"],[23, "vasea"],[24, "vasea"],[25, "vasea"],[26, "vasea"],[27, "vasea"],[28, "vasea"],
[29, "vasea"],[30, "vasea"],[31, "vasea"],[32, "vasea"],[33, "vasea"],[34, "vasea"],[35, "vasea"],
];
Ext.QuickTips.init();
var store_ = new Ext.data.ArrayStore({
storeId:"MyStore",
fields:[
{name: 'uid', type:"int"},
{name: 'name'},
],
paramNames:{start:0, limit:10}
});
var MyWindow=new Ext.Window({
title:"My Window",
width:480,
height:320,
layout:"border",
items:
{
xtype:"grid",
region:"center",
itemSelector: 'div.thumb-wrap',
store: store_,
columns:[
{
header:"User ID",
sortable:true,
resizable:true,
dataIndex:"uid",
width:100
},
{
header:"Name",
sortable:true,
resizable:true,
dataIndex:"name",
width:200
}
]
},
bbar:{
xtype:"paging",
store:store_,
pageSize:10,
displayInfo: true,
}
});
store_.loadData(someData);
MyWindow.show(this);
});
thank you.

Animal
16 Oct 2009, 12:25 AM
Paging is for loading pages of a huge dataset from the server.

You have all your data in the client.

krey
16 Oct 2009, 12:33 AM
Paging is for loading pages of a huge dataset from the server.

You have all your data in the client.
When I load data from server, the huge numbers of fields, i obtain the same error. At this example i have > 30 fields and need to split at 10 fields on page.
Example of loading huge data from server is at http://beta.endgame.tu2.ru/ address

krey
16 Oct 2009, 12:55 AM
Loading huge data from servers get the same problem. Example - http://beta.endgame.tu2.ru/. Just press "Make Query" - and will be transmitted more then 20 000 fields.
At test example i have more then 30 elements and want to make pages with 10 elements.