Jan 20, 2009, 1:04 PM
[CLOSED] pagination issue
Hi Guys,
I think I might have found a bug in the latest SVN code.
I have just updated and rebuilt Coolite library and then I tried using the following code:
but as soon as I removed the AutoLoadParams and added this to the PageLoad:
I think I might have found a bug in the latest SVN code.
I have just updated and rebuilt Coolite library and then I tried using the following code:
<asp:ObjectDataSource ID="SearchDataSource" runat="server" SelectMethod="GetCustomerList" TypeName="DB.Customers" OnSelected="SearchDataSource_Selected">
<SelectParameters>
<asp:Parameter Name="CountryCode" />
<asp:Parameter Name="Keyword" />
<asp:Parameter Name="Start" Type="Int32" />
<asp:Parameter Name="Limit" Type="Int32" />
<asp:Parameter Name="SortField" />
<asp:Parameter Name="SortDir" />
<asp:Parameter Name="count" Direction="Output" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<ext:Store ID="SearchStore" runat="server" AutoLoad="true" RemoteSort="true" DataSourceID="SearchDataSource" OnRefreshData="SearchStore_RefreshData">
<AutoLoadParams>
<ext:Parameter Name="Start" Value="={0}" />
<ext:Parameter Name="Limit" Value="={20}" />
</AutoLoadParams>
And it didn't work, displaying the pagination info as: "Displaying records NaN - NaN of 8000"but as soon as I removed the AutoLoadParams and added this to the PageLoad:
if (!IsPostBack)
{
SearchDataSource.SelectParameters["Start"].DefaultValue = "0";
SearchDataSource.SelectParameters["Limit"].DefaultValue = "20";
}
it worked fine