Paging is not working as expected:
1. Setting the PageSize to n will result in n+1 items being displayed
2. The last item on page n will appear as the first item on page n+1
This appears to have something to do with the height of the grid. By changing the Height from 500 to 400 in the example below, the page works as expected (ie items 1-20 on page 1, items 21-40 on page 2). When the Height is set to 500 , page 1 shows items 1-21, page 2 shows items 21-41
What am I missing ?
Here is the sampe code
Code: HTML/ASPX
<form id="form1" runat="server">
<div>
<eo:Grid ID="Grid1" runat="server" AllowPaging="true" PageSize="20"
width="600" Height="500">
<Columns>
<eo:StaticColumn DataField="name" HeaderText="Name"></eo:StaticColumn>
</Columns>
</eo:Grid>
</div>
</form>
And the codebehind
Code: C#
namespace bp
{
public class test
{
public string name { get;set;}
}
public partial class testPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
List<test> tests = new List<test>();
for (int i = 1; i < 100; i++)
{
test t = new test();
t.name = i.ToString();
tests.Add(t);
}
Grid1.DataSource = tests;
Grid1.DataBind();
}
}
}
}