private void MainGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
try
{
DataGridViewRow row = MainGrid.Rows[e.RowIndex];
Console.WriteLine($"row: {row}");
Console.WriteLine($"e.RowIndex: {e.RowIndex}");
string name = row.Cells[e.RowIndex].Value.ToString();
DetailForm detailForm = new DetailForm();
detailForm.ShowDialog();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
주코딩일지