コード例 #1
0
        private void grvListTrans_CellContentClick ( object sender, DataGridViewCellEventArgs e )
        {

            try
            {
                //if (e.RowIndex > -1 && this.grvListTrans.Columns[e.ColumnIndex] is DataGridViewCheckBoxColumn)
                //{
                //    grvListTrans.EndEdit ( );
                    Frm_Trans_Autho_Detail.docid = grvListTrans.Rows[e.RowIndex].Cells[0].Value.ToString ( ).Trim ( );
                    Frm_Trans_Autho_Detail authActi = new Frm_Trans_Autho_Detail ( );
                    authActi.ShowDialog ( );

                //    grvListTrans[e.ColumnIndex, e.RowIndex].Value = false;

                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show ( ex.Message );
            }

        }
コード例 #2
0
        private void dtgvDetail_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                //if (e.RowIndex > -1 && this.dtgvDetail.Columns[e.ColumnIndex] is DataGridViewCheckBoxColumn)
                //{
                //    dtgvDetail.EndEdit();
                    //Frm_AuthoActivity.cardnbr = dataGridView2["CardNo", e.RowIndex].Value.ToString();
                    Frm_Trans_Autho_Detail.docid = dtgvDetail.Rows[e.RowIndex].Cells[0].Value.ToString().Trim();
                    Frm_Trans_Autho_Detail authActi = new Frm_Trans_Autho_Detail();
                    authActi.ShowDialog();

                //    dtgvDetail[e.ColumnIndex, e.RowIndex].Value = false;

                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }