Mar 30, 2009, 6:50 PM
Missing first record in Grid Panel
*
It looks like I am not seeing the very first record on the GridPanel. The following query in my DB returns 31 records but in the data grid it shows 30 records.The very first record is missing !
Any help is appreciated.
--deb
Code Behind:
string sql = "select OrderNumber, ProductID , Line_item_id , Package_Unlock_Count_Used , Package_Unlock_Count_Total ,
Prod_ActivationDT from ShoppingCart_LineItem where CreatedOn between '03/02/2009'
and '03/30/2009' order by OrderNumber desc";
IDataReader rs2 = DB.GetRS(sql);
this.Store1.DataSource = rs2;
this.Store1.DataBind();
rs2.Close();
Aspx:
<ext:Store runat="server" ID="Store1" RemoteSort="true">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="OrderNumber" Type="Int" />
<ext:RecordField Name="ProductID" Type="Int" />
<ext:RecordField Name="Line_item_id" Type="Int" />
<ext:RecordField Name="Package_Unlock_Count_Used" Type="Int" />
<ext:RecordField Name="Package_Unlock_Count_Total" Type="Int" />
<ext:RecordField Name="Prod_ActivationDT" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="Product download history"
Height="300"
Width="800"
SelectionMemory="Disabled"
StoreID="Store1">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column Header="OrderNumber" DataIndex="OrderNumber">
<Renderer Fn="linkOrder" />
</ext:Column>
<ext:Column Header="Product Id" DataIndex="ProductID" />
<ext:Column Header="Line Item Id" DataIndex="Line_item_id" />
<ext:Column Header="Total Number of downloads" DataIndex="Package_Unlock_Count_Used" />
<ext:Column Header="Maximum allowed" DataIndex="Package_Unlock_Count_Total" />
<ext:Column Header="Activation Date" DataIndex="Prod_ActivationDT" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
</SelectionModel>
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar1" runat="server" PageSize="50" StoreID="Store1"
DisplayInfo="true" DisplayMsg="Displaying Records {0} - {1} of {2}" EmptyMsg="No records to display" />
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>