To reproduce:
private void RadGridView1_KeyPress(object sender, KeyPressEventArgs e)
{
int startIndex = radGridView1.CurrentRow.Index +1;
for (int i = startIndex; i < radGridView1.Rows.Count; i++)
{
var value = radGridView1.Rows[i].Cells["Name"].Value.ToString().ToLower();
if (value.StartsWith(e.KeyChar.ToString()))
{
radGridView1.TableElement.ScrollToRow(radGridView1.Rows[i]);
radGridView1.ClearSelection();
radGridView1.Rows[i].IsSelected = true;
radGridView1.Rows[i].IsCurrent = true;
radGridView1.Columns[1].IsCurrent = true;
break;
}
}
}
- Press some key so the grid is scrolled down, then press the down key.
- The first row is selected instead of the next one.
Workaround:
remove this line:
radGridView1.Rows[i].IsSelected = true;