private void gridAll_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (!txtEmail.Enabled) { ButtonControl(true, true, false, false, true, false); int clientid = (int)gridAll.Rows[e.RowIndex].Cells[0].Value; clsClient client = new clsClient(); client = admin.Searched_Client_by_RefClient(clientid); txtName.Text = client.Name; txtPhone.Text = client.PhoneNumber; txtEmail.Text = client.EMail; cboRefHouse.Text = client.RefHouse.ToString(); cboStatus.Text = client.Status; } }