Пример #1
0
 private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     //MessageBox.Show(Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex]));
     //dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = comboBox1.SelectedValue;
     //MessageBox.Show("" + e.ColumnIndex);
     if (e.ColumnIndex == 1)
     {
         int idServiceDemande = (int)dataGridView1.Rows[e.RowIndex].Cells[7].Value;
         int idEtat = (int)dataGridView1.Rows[e.RowIndex].Cells[8].Value;
         FormulaireModif monForm = new FormulaireModif(idServiceDemande, idEtat, dataGridView1);
         monForm.Show();
     }
 }
Пример #2
0
 //sur le double clique de la case du tableau
 private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     //MessageBox.Show(Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex]));
     //dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = comboBox1.SelectedValue;
     //MessageBox.Show("" + e.ColumnIndex);
     if ((e.ColumnIndex == 1) && ((String)dataGridView1.Rows[e.RowIndex].Cells[1].Value!="FACTURER"))//double-clique sans action si valeur = réalisé
     {
         //if
         int idServiceDemande = (int)dataGridView1.Rows[e.RowIndex].Cells[7].Value;
         int idEtat = (int)dataGridView1.Rows[e.RowIndex].Cells[8].Value;
         FormulaireModif monForm = new FormulaireModif(idServiceDemande, idEtat, dataGridView1);
         monForm.Show();
     }
 }