DataGridView Keydown Up Index 0 C#

if (dtSearch.CurrentCell.RowIndex == 0) {
  txtProductName.Focus();
  txtProductName.SelectAll();
}