private void DataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { var x = dataGridView1.Rows[e.RowIndex].Cells[0]; Guid newsItemId = Guid.Empty; if (Guid.TryParse(x.ToString(), out newsItemId)) { Form f = new NewsItemEdit(newsItemId); f.ShowDialog(); PopulateForm(); } }
private void btNew_Click(object sender, EventArgs e) { Form newNewItem = new NewsItemEdit(); newNewItem.Show(); }