private void buttonInfo_Click(object sender, EventArgs e) { try { FormBookExemplar newForm = new FormBookExemplar(Int32.Parse(dataGridViewB.CurrentRow.Cells[0].Value.ToString())); newForm.ParentAdminMainMenu = this; newForm.Show(); Hide(); } catch (NullReferenceException) { MessageBox.Show("Строка не выбрана"); } }