Exemple #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1 && e.ColumnIndex == 0 && !this.dataGridView1.Rows[e.RowIndex].IsNewRow)
     {
         EditSqlStatementFrm f = new EditSqlStatementFrm();
         f.SetSql(this.dataGridView1[this.ColumnSql.Index, e.RowIndex].Value.ToString());
         if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.dataGridView1.Rows[e.RowIndex].
             Cells[this.ColumnSql.Name].Value = f.GetSql();
         }
     }
 }
Exemple #2
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1 && e.ColumnIndex == 0 && !this.dataGridView1.Rows[e.RowIndex].IsNewRow)
     {
         EditSqlStatementFrm f = new EditSqlStatementFrm();
         f.SetSql(this.dataGridView1[this.ColumnSql.Index, e.RowIndex].Value.ToString());
         if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.dataGridView1.Rows[e.RowIndex].
                 Cells[this.ColumnSql.Name].Value = f.GetSql();
         }
     }
 }