отображение последнего элемента

This commit is contained in:
kotcheshir73 2021-04-12 10:11:43 +04:00
parent d5319759e2
commit 4fc7c24c81

View File

@ -179,6 +179,11 @@ namespace DepartmentPortalDesctop
dataGridViewControls.Rows[i - 1].Selected = true; dataGridViewControls.Rows[i - 1].Selected = true;
ShowControl(new Guid(dataGridViewControls.Rows[i - 1].Cells[0].Value.ToString())); ShowControl(new Guid(dataGridViewControls.Rows[i - 1].Cells[0].Value.ToString()));
} }
else if (dataGridViewControls.Rows.Count == 1)
{
dataGridViewControls.Rows[0].Selected = true;
ShowControl(new Guid(dataGridViewControls.Rows[0].Cells[0].Value.ToString()));
}
break; break;
} }
} }