private void cmd_edit_message_Click(object sender, EventArgs e) { if (dg_outgoing.SelectedCells.Count > 0) { addMessage am = new addMessage(this, (canMessage)dg_outgoing["cmO", dg_outgoing.CurrentCell.RowIndex].Value); am.ShowDialog(); } else MessageBox.Show("You need to select a message to edit.", "Row missing", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void cmd_add_message_Click(object sender, EventArgs e) { addMessage am = new addMessage(this,null); am.ShowDialog(); }