Feb 01, 2010, 4:23 PM
[CLOSED] Item Count for Store - Server Side
What is the most efficient way to get the item count of a store on the server side. Don't want have to bind if the Products store is already loaded. Is there anyway to cast the Store to a DataTable to get item count.
protected void BindProductsGrid()
{
//Want to see what the item count is before binding
this.Product.DataSource = Quote.QuoteUtil.GetProductsForPRP();
this.Product.DataBind();
Product.Sort(
Convert.ToString(Utilities.CmsUtilities.EnvironmentalMapping["PRP.PRPQuote.Store.Product.Sort.Column.Default"]),
Coolite.Ext.Web.SortDirection.ASC);
}
<ext:Store ID="Product" runat="server" ShowWarningOnFailure="false"
OnRefreshData="Products_Refresh">
<Reader>
<ext:JsonReader ReaderID="atnProductVersionId">
<Fields>
<ext:RecordField Name="atnProductVersionId" Type="Int" />
<ext:RecordField Name="strProductVersionNumber" Type="String" />
<ext:RecordField Name="strProductName" Type="String" />
<ext:RecordField Name="strProductSize" Type="String" />
<ext:RecordField Name="strProductType" Type="String" />
<ext:RecordField Name="strProductVersionMessages" Type="String" />
<ext:RecordField Name="strProductVersionBackOrderMessage" Type="String" />
<ext:RecordField Name="bitHideBackProductVersion" Type="Boolean" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>