PDA

View Full Version : paging problem



kirankumar1231
23 Mar 2011, 10:53 PM
hello experts,

i have paging problem with my grid
all the pages shows up all results though i have set the start and end limit

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:600,
store:store,
cm: colModel,
bbar:paging
});
store.load({params:{start:0,limit:1}});
grid.render(document.body);
});
</script>


is there any issues related to my server side scripting????

help me experts

mcadirci
23 Mar 2011, 11:42 PM
It is a server side problem. (ExtJS can't know data of other pages at server if server does not send)

kirankumar1231
24 Mar 2011, 1:19 AM
It is a server side problem. (ExtJS can't know data of other pages at server if server does not send)



do you have ideaa about this how to tell about the start and end limit to server??

mcadirci
24 Mar 2011, 1:46 AM
That is smt related with sql. Try sql forums for this.

cmhampton
24 Mar 2011, 6:34 AM
Which SQL are you using? MySQL? MSSQL?

kohyea
25 Mar 2011, 7:04 PM
get parameters start and limit from GET or POST, then execute SQL with them.

Kohyea

conorarmstrong
26 Mar 2011, 7:08 AM
Dont double post. You posted the same q elsewhere.

Answer depends on you server backend. Most likel incorrect use of LIMIT and OFFSET sql keywords - thats if you datasource is an sql based database. Failing that, would need to see your server code