How to reproduce: check the attached video as well
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.radGridView1.DataSource = this.GetData();
}
private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Date", typeof(DateTime));
dt.Columns.Add("Bool", typeof(bool));
for (int i = 0; i < 10; i++)
{
dt.Rows.Add(i, "Name " + i, DateTime.Now.AddDays(i), i % 2 == 0);
}
return dt;
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radGridView1.TableElement.ScrollToRow(0);
this.radGridView1.Focus();
}
}
Workaround: call the method if the row is not selected
private void radButton1_Click(object sender, EventArgs e)
{
if (!this.radGridView1.Rows[0].IsSelected)
{
this.radGridView1.TableElement.ScrollToRow(0);
}
this.radGridView1.Focus();
}