To reproduce:
1. Add a RadGridView and a RadButton.
2. Enable paging.
3. Use the code snippet below:
private void Form1_Load(object sender, EventArgs e)
{
this.ordersTableAdapter.Fill(this.nwindDataSet.Orders);
bs.DataSource = this.ordersBindingSource;
this.radGridView1.DataSource = bs;
}
BindingSource bs = new BindingSource();
private void radButton1_Click(object sender, EventArgs e)
{
bs.Filter ="ShipName LIKE '%z%'";
}
4. Navigate to page 80 and click the button.
5. You have only 4 pages available , but you are still positioned on page 80.
Workaround:
private void radButton1_Click(object sender, EventArgs e)
{
bs.Filter ="ShipName LIKE '%z%'";
if (this.radGridView1.MasterTemplate.PageIndex>this.radGridView1.MasterTemplate.TotalPages)
{
this.radGridView1.MasterTemplate.MoveToFirstPage();
}
}