PDA

View Full Version : paging problem



kirankumar1231
23 Mar 2011, 1:44 AM
hello experts
i have paging problem with my exts grid

i have only 3 records in my db
i have given pagesize as 1,
start as 0 and limit as 1
but i am getting all the 3 records in the first page of my grid
have a look at this image
25309

this is my code


<script type="text/javascript">
Ext.onReady(function() {
Ext.QuickTips.init();
var reader=new Ext.data.JsonReader({
},[
{name: 'empid',mapping:'empid'},
{name: 'empname'}
]
);
var store=new Ext.data.Store({
root:'employee',
remoteSort:true,
proxy : new Ext.data.HttpProxy({
url: 'get.json',
method:'GET'
}),
reader:reader
});
var colModel = new Ext.grid.ColumnModel([
{header: "empid", width: 120, sortable: true, dataIndex: "empid"},
{header: "empname", width: 90, sortable: true, dataIndex: "empname"}
]);

var paging=new Ext.PagingToolbar({
pageSize:1,
store: store,
displayInfo: true,
displayMsg: "Displaying topics {0} - {1} of {2}",
emptyMsg: "No topics to display"
});
var grid = new Ext.grid.GridPanel({ height:200,
title:'employee details',
width:200,
store:store,
cm: colModel,
bbar:paging
});
store.load({params:{start:0,limit:1}});
grid.render(document.body);
});
</script>

kohyea
25 Mar 2011, 7:23 PM
this is a server end problem, please POST your server end codes.

Kohyea