May 05, 2015, 8:32 AM
[CLOSED] GridPanel - PagingToolbar - PageSize not working
Hi,
I'm using a gridpanel with a pagingtoolbar, but it seems the pagesize property doesn't work on the first page.
It works correctly on the following pages but on the first page, the grid loads all the records.
Here below the code:
Thanks for your help!
Have a good day.
I'm using a gridpanel with a pagingtoolbar, but it seems the pagesize property doesn't work on the first page.
It works correctly on the following pages but on the first page, the grid loads all the records.
Here below the code:
<ext:GridPanel ID="gpSensorHistory" runat="server" Title="History" EnableColumnMove="false" EnableColumnHide="false" EnableColumnResize="false" > <Store>
<ext:Store ID="stSensorHistory" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Value" Type="String" />
<ext:RecordField Name="DateofScan" Type="Date" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:DateColumn ColumnID="DateofScan" Align="Left" DataIndex="DateofScan"
MenuDisabled="true" Sortable="false" Groupable="false" Width="120" Format="yyyy-MM-dd HH:mm:ss" />
<ext:Column ColumnID="Value" Align="Left" DataIndex="Value" MenuDisabled="true"
Sortable="false" Groupable="false" Width="100" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true">
</ext:RowSelectionModel>
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="30" StoreID="stSensorHistory"
DisplayInfo="true" HideRefresh="true">
<Plugins>
<ext:SlidingPager ID="SlidingPager1" runat="server">
<GetText Fn="function (s) {return 'View Page: '+ s.value}" />
</ext:SlidingPager>
</Plugins>
</ext:PagingToolbar>
</BottomBar>
</ext:GridPanel>
And here I load the data into the store: [DirectMethod]
public void LoadWindow_SensorDetails(int ID_Sensor)
{
this.stSensorHistory.DataSource = DataManager.GetSensorHistory(ID_Sensor);
this.stSensorHistory.DataBind();
}
How can I solve this issue?Thanks for your help!
Have a good day.
Last edited by Daniil; May 12, 2015 at 7:06 PM.
Reason: [CLOSED]