When using Paging, Grid on first page loads up and shows 'NaN'
.vb (Sample on Page Load)
' Load Product
ProductsStore.Proxy.Add(New HttpProxy() With {.Method = HttpMethod.GET, _
.Url = Core.Web.ProcessController.ProductGroup.GetAllProductsForProductGroupHandlerUrl() _
})
' Use for Paging...
ProductsStore.AutoLoadParams.Add(New Parameter() With {.Name = Core.Constants.START_PARAM, .Mode = ParameterMode.Raw, .Value = "={" + Core.Constants.START_PARAM_NUMBER + "}"})
ProductsStore.AutoLoadParams.Add(New Parameter() With {.Name = Core.Constants.LIMIT_PARAM, .Mode = ParameterMode.Raw, .Value = "={" + Core.Constants.LIMIT_PARAM_NUMBER + "}"})
ProductsStore.BaseParams.Add(New Parameter() With {.Name = Core.Constants.PRODUCT_GROUP_ID, .Mode = ParameterMode.Raw, .Value = "={" + CStr(999) + "}"})
.aspx (Grid)
<ext:GridPanel ID="gpProductGroupList" runat="server" Height="300px" AutoWidth="true"
StoreID="ProductsStore" TrackMouseOver="true" Title="Manage Product Names" StripeRows="true"
AutoScroll="true" AutoDataBind="true" AutoExpandColumn="ProductName">
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:Column ColumnID="ProductId" DataIndex="ProductId" Header="Product Code" Sortable="true" />
<ext:Column ColumnID="UPCCode" DataIndex="UPCCode" Header="UPC Code" Sortable="true" />
<ext:Column ColumnID="ProductName" DataIndex="ProductName" Header="Product Name"
Sortable="true" />
</Columns>
</ColumnModel>
<View>
<ext:GridView ID="gvProduts" runat="server" ForceFit="true" EnableRowBody="true" />
</View>
<SelectionModel>
<ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" HideCheckAll="true"
SingleSelect="false" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="20" DisplayInfo="true"
DisplayMsg="Displaying items {0} - {1} of {2}" EmptyMsg="No items to display" />
</BottomBar>
<LoadMask ShowMask="true" Msg="Loading..." />
</ext:GridPanel>
.aspx (Store)
<ext:Store ID="ProductsStore" runat="server" RemoteSort="true" AutoLoad="false">
<Reader>
<ext:JsonReader Root="Data" ReaderID="ProductId" TotalProperty="TotalRecords">
<Fields>
<ext:RecordField Name="ProductId" Type="String" />
<ext:RecordField Name="MarketID" Type="String" />
<ext:RecordField Name="ProductName" Type="String" />
<ext:RecordField Name="UPCCode" Type="Int" />
<ext:RecordField Name="FreshDryIndicator" Type="String" />
<ext:RecordField Name="EquivalentUnits" Type="Int" />
<ext:RecordField Name="JobTag" Type="Int" />
<ext:RecordField Name="ActiveFlag" Type="Int" />
<ext:RecordField Name="LastModifyUserID" Type="Int" />
<ext:RecordField Name="LastModifyDateTime" Type="Date" />
<ext:RecordField Name="InsertionDateTime" Type="Date" />
<ext:RecordField Name="InGroup" Type="Boolean" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Fn="selectRows" />
</Listeners>
</ext:Store>
Or within the Javascript like below...
ProductsStore.load({ params: { productGroupID: record.ProductGroupID} });