0
我正在使用dojox.grid.DataGrid和dojox.data.QueryReadStore。我有客戶端下面的代碼:帶有QueryReadStore虛擬分頁問題的Dojox數據網格
var store = new dojox.data.QueryReadStore({url:"<?php echo $this->url(array("action"=>"load-plans")) ?>"});
//var store = new dojo.data.ItemFileWriteStore({url:"<?php echo $this->url(array("action"=>"load-plans")) ?>"});
/*set up layout*/
var layout = [[
{name: 'Plan Name', field: 'title', width: '100px'},
{name: 'User', field: 'email', width: '150px',get: formatEmail},
{name: 'Status', field: 'percentage_completed', width: '100px'},
{name: 'Word Count', field: 'word_count', width: '50px'},
{name: 'Revenue Entries', field: 'revenue_count', width: '50px'},
{name: 'Expense Entries', field: 'expense_count', width: '50px'},
{name: 'Fund Entries', field: 'funds_count', width: '60px'},
{name: 'Total Profit', field: 'total_profit', width: '60px'},
{name: 'Total Funding', field: 'total_funding', width: '60px'},
{name: 'Template Used', field: 'template_title', width: '100px'},
{name: 'Last modified', field: 'updated_at', width: '100px'},
]];
/*create a new grid:*/
grid = new dojox.grid.DataGrid({
id: 'plan-grid',
store: store,
structure: layout,
escapeHTMLInData: false
},
在服務器端: $數據= $ availableMerchants->的GetList($排序,$秩序,$開始,$限制) - >指定者();
$dojoData = new Zend_Dojo_Data('id', $data, 'id');
$this->getResponse()->setHeader('Content-Range', "items $start-$limit/302");
echo $dojoData->toJson();
但是,當我滾動虛擬尋呼,不起作用。它僅以start = 0 & count = 25發出第一個請求,並且不會提出進一步的請求。
請幫忙。