0

From what I have read on the internet about DataGrid pagination, I still can make it work. I have a DataGrid like this:

var grid = new DataGrid({ 
    store: dataStore = new ObjectStore({objectStore: jsonrest_store}), 
    structure: [ 
        {name: 'aaa', field: 'aaa', 'width': initialCol1}, 
        {name: 'bbb', field: 'bbb', 'width': initialCol2}, 
        {name: 'ccc', field: 'ccc', 'width': initialCol3}, 
        {name: 'ddd', field: 'ddd', 'width': initialCol4} 
    ], 
    rowsPerPage: 10, 
    autoHeight: 8, 
    keepRows: 100 
}, "id_of_container"); 
grid.startup(); 

I tried different combinations of rowsPerPage and autoheight(number/off) but whenever I scroll down no call is made not even on the fetch of the ObjectStore. Does anyone know what the problem is?

Bucket
  • 7,415
  • 9
  • 35
  • 45
Sebastian
  • 11
  • 1
  • Here's a good answer to your question i think : http://stackoverflow.com/questions/5620385/set-datagrid-to-show-just-5-rows-per-page Regards – MiBrock Oct 22 '13 at 07:27
  • Thank you for the answer but I have seen that and it is not helping exactly... The problem that I have is that no fetch is called on the scroll down of the table, and so no query on the jsonrest store is called. – Sebastian Oct 22 '13 at 07:35

1 Answers1

0

Try giving this in your grid declaration

filter: {
             isServerSide: true,                 
 }

//It should fire the request automatically

caspersky 48
  • 239
  • 1
  • 4
  • 11