- Form1 contains DataGridView.
- Form2 contains Textboxes, radioButton and Button.
When I select DataGridView Row it will show me Form2 and Displayed their values in TextBoxs . Every Thing seems better just now.
What I want know is after displaying datas in textboxes , I check the RadioButton then click in the button it will return to Form1 of The selected Row and Change The value of Cell 5.
Here there is My code:
Form1
- private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- DataGridViewCell cell = null;
- foreach (DataGridViewCell selectedCell in dataGridView1.SelectedCells)
- {
- cell = selectedCell;
- break;
- }
- if (cell != null)
- {
- DataGridViewRow row = cell.OwningRow;
- string objet = row.Cells[0].Value.ToString();
- string objectif = row.Cells[1].Value.ToString();
- string date = row.Cells[2].Value.ToString();
- string commentaire = row.Cells[3].Value.ToString();
- string client = row.Cells[5].Value.ToString();
- string commercial = row.Cells[6].Value.ToString();
-
- Détails_RDV détails = new Détails_RDV();
-
- détails.obj = objet;
- détails.objectif = objectif;
- détails.date = date;
- détails.comm = commentaire;
- détails.clt = client;
- détails.commer = commercial;
-
- détails.Show();
-
- }
- }
Form2
- public partial class Détails_RDV : Form
- {
- public string obj ;
- public string objectif;
- public string date;
- public string comm;
- public string clt ;
- public string commer;
-
- public Détails_RDV()
- {
- InitializeComponent();
-
- }
-
- private void Détails_RDV_Load(object sender, EventArgs e)
- {
-
- txtObjet.Text = obj;
- txtObjectif.Text = objectif;
- txtDate.Text = date;
- txtCommerci.Text = commer;
- txtClient.Text = clt;
- txtCommentaire.Text = comm;
- }
-
- private void btnValider_Click(object sender, EventArgs e)
- {
- if (radBtnEffectue.Checked == true)
- {
-
- }
- }
How Can I do That ?
Please help, Thanks in Advance