2013-10-21 63 views
0

從我在網上讀到的關於DataGrid分頁的內容中,我仍然可以使它工作。我有一個DataGrid這樣的:DOJO DataGrid + JsonRest +分頁

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(); 

我試過的rowsPerPageautoheight(number/off)不同的組合,但每當我向下滾動沒有調用時甚至沒有對ObjectStore的獲取。有誰知道問題是什麼?

+0

這裏有一個很好的回答你的問題,我認爲:http://stackoverflow.com/questions/5620385/set-datagrid-to-show-just-5-rows-per-page Regards – MiBrock

+0

謝謝你的回答,但我已經看到了,它並沒有幫助完全...我有的問題是在表格向下滾動時不會調用提取,因此在該表格上沒有查詢e jsonrest商店被稱爲。 – Sebastian

回答

0

嘗試在網聲明放棄該

filter: { 
      isServerSide: true,     
} 

//它應該火請求自動