Sep 09, 2015, 6:40 PM
GridView Pagination issue
Hi guys,
So i have a gridview set up inside of a form panel with some text fields and buttons, but can't seem to get the pagination of the result set to work. I set PageSize = 20 and have the Paging Toolbar set up in the BottomBar, however the result set doesn't get paged out: it just displays to the bottom of the form and stops displaying anything else. Could you help me figure out what I'm missing? Here's my code:
So i have a gridview set up inside of a form panel with some text fields and buttons, but can't seem to get the pagination of the result set to work. I set PageSize = 20 and have the Paging Toolbar set up in the BottomBar, however the result set doesn't get paged out: it just displays to the bottom of the form and stops displaying anything else. Could you help me figure out what I'm missing? Here's my code:
<ext:FormPanel ID="NYRollOffPanel"
runat="server"
Hidden="true"
Frame="true"
Height="475" Layout="AutoLayout" AutoHeight="true">
<Items>
<ext:Container ID="container1" runat="server" AnchorHorizontal="100%" Layout="HBoxLayout">
<Items>
<ext:TextField ID="tDCID"
runat="server"
FieldLabel="DCID"
LabelWidth="40"
MarginSpec="0 0 5 0">
</ext:TextField>
<ext:Button ID="btnGenerateNYRollOffs"
runat="server"
Text="Generate Report"
MarginSpec="0 0 5 5">
<Listeners>
<Click Handler="#{dsNYRollOff}.reload(); #{gpNYRollOffs}.setVisible(true);" />
</Listeners>
</ext:Button>
</Items>
</ext:Container>
<ext:GridPanel ID="gpNYRollOffs"
runat="server"
width="512"
Buffered="true"
Hidden="true"
Layout="AutoLayout">
<Store>
<ext:Store ID="dsNYRollOff"
runat="server"
PageSize="20"
AutoLoad="true">
<Model>
<ext:Model ID="mdlMatrix1" runat="server" IDProperty="MAIDT">
<Fields>
<ext:ModelField Name="dealcapid" Type="Int" />
<ext:ModelField Name="CustomerNumber" Type="Int" />
<ext:ModelField Name="RateID" Type="Int" />
<ext:ModelField Name="Matrix" Type="Int" />
<ext:ModelField Name="BillingType" Type="String" />
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy Url="/Operations/GetNYRollOffs/" Timeout="1200000">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader Root="data" TotalProperty="total" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="dcid" Value="#{tDCID}.getValue()" Mode="Raw" />
</Parameters>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ID="DCID" runat="server" DataIndex="dealcapid" Text="DCID" Width="50" />
<ext:Column ID="ColumnCustomerNumber" runat="server" DataIndex="CustomerNumber" Text="Customer Number" Width="150" />
<ext:Column ID="ColumnRateID" runat="server" DataIndex="RateID" Text="Rate ID" Width="150" />
<ext:Column ID="ColumnMatrix" runat="server" DataIndex="Matrix" Text="Matrix" Width="60" />
<ext:Column ID="ColumnBillingType" runat="server" DataIndex="BillingType" Text="Billing Type" Width="100" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
</SelectionModel>
<View>
<ext:GridView ID="GridView1" runat="server" />
</View>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" AutoHeight="true" Frame="true"
HideRefresh="true"
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying rows {0} - {1} of {2}"
EmptyMsg="No rows to display">
<Items>
<ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
<ext:Button ID="btnExportPortal" runat="server" Text="To Excel" Icon="PageExcel">
<DirectEvents>
<Click Url="/Operations/ExportToExcel" IsUpload="true" />
</DirectEvents>
</ext:Button>
</Items>
</ext:PagingToolbar>
</BottomBar>
</ext:GridPanel>
</Items>
<Listeners>
</Listeners>
</ext:FormPanel>