如何在 C# 中向上和向下移动 RadGridView(在 Telerik 中)选定的行?

How To Move RadGridView(in Telerik) Selected Row UP and DOWN In C#?

当我在 RadGridView(在 Telerik 中)上使用向上或向下按钮时,我想跳到上一行或下一行。
下图显示了我的目的:

private void btnUP_Click(object sender, EventArgs e)
{
    if (dgv != null)
    {
        if (dgv.Rows.Count > 0)
        {
            try
            {
                dgv.GridNavigator.SelectPreviousRow(1);
            }
            catch { }
        }
    }
}


private void btnDown_Click(object sender, EventArgs e)
{
    if (dgv != null)
    {
        if (dgv.Rows.Count > 0)
        {
            try
            {
                dgv.GridNavigator.SelectNextRow(1);
            }
            catch { }
        }
    }

}