private void Update_Click(object sender, EventArgs e) { if (dataGridViewClients.SelectedRows.Count > 0) { selectedIdFromClients = Convert.ToInt32(dataGridViewClients.SelectedRows[0].Cells[0].Value.ToString()); FAddClient.ClientId = selectedIdFromClients; FAddClient.Button += new EventHandler(ButtonClickedForClients); FAddClient.ShowDialog(); } else { MessageBox.Show("There is not any row selected!"); } }
private void button1_Click(object sender, EventArgs e) { FAddClient.Button += new EventHandler(ButtonClickedForClients); FAddClient.ShowDialog(); }