示例#1
0
 private void DataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (!(e.RowIndex == -1))
     {
         colunaSelecionada = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row
                             as MVCProject.SistemaBibliotecaDBDataSet.AutoresRow;
     }
 }
示例#2
0
        private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            colunaSelecionada = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row
                                as MVCProject.SistemaBibliotecaDBDataSet.AutoresRow;

            /*
             * switch (e.ColumnIndex)
             * {
             *  /*
             *  case 0:
             *      {
             *          this.autoresTableAdapter.DeleteQuery(colunaSelecionada.Id);
             *          break;
             *      }
             *  case 0:
             *      {
             *          frmEditarAutores editar = new frmEditarAutores();
             *          editar.edicao = colunaSelecionada;
             *          editar.ShowDialog();
             *          break;
             *      }
             *
             * }*/
        }