Hi,

I've been plugging away at this now for a couple of days and I can't seem to get any headway on it.

Our group is converting a paginated grid that was working in 1.1 to 2.0. But for some reason our pagination is not working. I'm pretty sure it's something really silly, like I'm missing something in HttpProxy or my DataStore is screwed up somehow.

But I've gone through all the 2.0 samples and threads I can find and have been unable to figure out a solution. Any help would be greatly appreciated.

JS Code:
HTML Code:
<script type="text/javascript">
	Ext.onReady(function(){
		init_grid_agreements_grid();
	});

	function init_grid_agreements_grid()	{

            var reader = new Ext.data.JsonReader({
				                                    root: 'data',
				                                    totalProperty: 'total_rows',
				                                    idProperty: 'id'
				                                 }, 
				                                 [{name: "id"}, {name: "agreement_type_id"}, {name: "agreement_owner"}, {name: "agreement_ft_id"}, {name: "agreement_id"}, {name: "agreement_title"}, {name: "agreement_state_id"}, {name: "party_1"}, {name: "party_1_address"}, {name: "party_1_role"}, {name: "party_2"}, {name: "party_2_address"}, {name: "party_2_role"}])

		var ds = new Ext.data.Store({
			proxy: new Ext.data.HttpProxy({url: '/agreements.json', method: 'get'}),
			reader: reader,
			remoteSort: true
		});

		var cm = new Ext.grid.ColumnModel( [{hidden: true, dataIndex: "id"}, {header: "Contract Type", dataIndex: "agreement_type_id"}, {header: "Agreement Owner", dataIndex: "agreement_owner"}, {header: "Finetooth Id", dataIndex: "agreement_ft_id"}, {header: "Agreement Id", dataIndex: "agreement_id"}, {header: "Contract Title", dataIndex: "agreement_title"}, {header: "Contract State", dataIndex: "agreement_state_id"}, {header: "Party 1", dataIndex: "party_1"}, {header: "Party 1 Address", dataIndex: "party_1_address"}, {header: "Party 1 Role", dataIndex: "party_1_role"}, {header: "Party 2", dataIndex: "party_2"}, {header: "Party 2 Address", dataIndex: "party_2_address"}, {header: "Party 2 Role", dataIndex: "party_2_role"}] )
		cm.defaultSortable = true;

		grid = new Ext.grid.GridPanel({
				                          el: 'agreements_grid',
				                          ds: ds,
				                          cm: cm,
				                          autoSizeColumns: true,
				                          loadMask: true,
				                          width: 688,
				                          height: 428
      ,
				                          bbar: new Ext.PagingToolbar({
 	                          				                         pageSize: 20,
                                                                        		 displayInfo: true,
  		                                                                         emptyMsg: "No results to display",
                                                                                         store: ds
		                                          })
		});

               grid.addListener('rowdblclick', open_contract_details_from_grid)

               grid.render();

	       ds.load({ params: {start:0, limit:20} })

	}

</script>

<div id="agreements_grid" style=""></div>
My issue is that I always seem to get the first page of results. The grid returns total_rows and the page number correctly but fails to retrieve the correct JSON for the page.

The developers have checked the backend code and pinged this one back over the fence to me. But I'm at a loss as to why this has stopped working in 2.0.

Any help would be appreciated. Thanks.