Hi ,
I am using grid to display my resultset. The problem is that my nextpage button only works once , it only move from 1 to 2 and then if i press next button it is not going to page3. But if i individually press 3 it show right results.
Also , after pressing last page button , if i press previous page button it goes to page 1, this is happening even i am on any page after page 2.
I think my previous and next page behaving like first and last page thats why it only work for page 1 and 2.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource1"
BorderStyle="None" OnItemDataBound="RadGrid1_ItemDataBound" >
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView AutoGenerateColumns="true">
</MasterTableView>
</telerik:RadGrid>
codebehind:
protected void RadGrid1_NeedDataSource1(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = list;
}
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridPagerItem)
{
Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
lblPageSize.Text = Sitecore.Globalization.Translate.Text("Results per page");
RadGrid1.PagerStyle.PagerTextFormat = "{4} {5} items in {1} pages";
}
}
Any help or advise.
thanks in Advance.
I am using grid to display my resultset. The problem is that my nextpage button only works once , it only move from 1 to 2 and then if i press next button it is not going to page3. But if i individually press 3 it show right results.
Also , after pressing last page button , if i press previous page button it goes to page 1, this is happening even i am on any page after page 2.
I think my previous and next page behaving like first and last page thats why it only work for page 1 and 2.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource1"
BorderStyle="None" OnItemDataBound="RadGrid1_ItemDataBound" >
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView AutoGenerateColumns="true">
</MasterTableView>
</telerik:RadGrid>
codebehind:
protected void RadGrid1_NeedDataSource1(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = list;
}
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridPagerItem)
{
Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
lblPageSize.Text = Sitecore.Globalization.Translate.Text("Results per page");
RadGrid1.PagerStyle.PagerTextFormat = "{4} {5} items in {1} pages";
}
}
Any help or advise.
thanks in Advance.