0
我現在正在掙扎幾天,但沒有成功。 我沒有翻閱我的網格,雖然pagingbar顯示的頁面數量和次數right.Here是一些代碼片段:ext.direct網格分頁不起作用
型號:
Ext.define('TBS', {
extend: 'Ext.data.Model',proxy: {
type: 'direct',
api: {
create: QueryDatabase.createRecord,
read: QueryDatabase.getResults,
update: QueryDatabase.updateRecords,
destroy: QueryDatabase.destroyRecord
},
simpleSortMode: true
}...
店:
var store = Ext.create('Ext.data.Store', {
model: 'TBS',
autoLoad: true,
autoDestroy: true,
pageSize: 20,
remoteSort: false,
sortOnLoad: true,
sorters: { property: 'StartDate', direction : 'DESC' }...
和grid:
var grid = Ext.create('Ext.grid.Panel', {...
dockedItems: [{
xtype: 'pagingtoolbar',
dock: 'bottom',
store: store,
pageSize: 20,
displayInfo: true,
displayMsg: 'Total: {2}',
items: ['-',{
xtype: 'button',
iconCls: 'clean',
text: 'Clear All Filter',
handler: function() {
//console.log(Ext.encode(grid.filters.getFilterData()));
grid.filters.clearFilters();
store.clearFilter();
}
}]
}]
我正在使用ExtJs 4.0.7
任何提示都非常讚賞。
Thx。
服務器始終返回所有數據。但據我瞭解,這是ext.direct接口的做法,分頁是在本地完成的。 – user1547821 2012-07-24 08:39:26
你誤會了,那是不正確的。 – 2012-07-24 08:51:05
那麼如何進行 ? – user1547821 2012-07-24 09:27:54