PDA

View Full Version : [CLOSED] how to page with PageProxy



tobros
Sep 18, 2013, 6:31 AM
<ext:GridPanel runat="server" Title="现金流量数据调整">
<Store>
<ext:Store runat="server" ID="s_store" OnReadData="on_read_data_xjllsjtz" PageSize="20" RemotePaging="False" >
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="VouchId"></ext:ModelField>
<ext:ModelField Name="Ddate"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:PageProxy>
</ext:PageProxy>
</Proxy>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" DataIndex="Ddate" Text="日期"></ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:PagingToolbar runat="server" StoreID="s_store"></ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:GridPanel>



protected void on_read_data_xjllsjtz(object sender, StoreReadDataEventArgs e)
{
int start = e.Start;
int limit = e.Limit;
int total = 0;
var ll = cashflowDataAdjustService.GetCashflowDataAdjust(st art, limit,out total);
// var page = new Paging<CashflowDataAdjust1> (ll, total);
e.Total = total;
s_store.DataSource = ll;

s_store.DataBind();
}

I find that when page loads , the start and the limit is -1,how to pass start and limit from front page. I notice ajaxproxy uses Paging class,
whether Paging class must use in pageproxy or not?

Daniil
Sep 18, 2013, 11:55 AM
Hi @tobros,

If you are setting up

RemotePaging="False"
then you are not supposed to do paging on server, in the OnReadData handler.

So, it is confusing. Do you need remote or local paging?