//VERIFICA QUE LA CELDA SELECCIONADA SEA DE TIPO CHECKBOX private void dgvStandingOrder_CurrentCellDirtyStateChanged(object sender, EventArgs e) { if (GRIDVIEWTIPOSPAGOS.CurrentCell is DataGridViewCheckBoxCell) { GRIDVIEWTIPOSPAGOS.CommitEdit(DataGridViewDataErrorContexts.Commit); } }
//CONTROLA EL CAMBIO DEL CHECBOX DENTRO DEL GRIDVIEW private void dgvStandingOrder_CellContentClick(object sender, DataGridViewCellEventArgs e) { double monto = 0; CALCULAR_MONTO_A_PAGAR(); if (GRIDVIEWTIPOSPAGOS.Columns[e.ColumnIndex].Name == "SELECCIONAR" && GRIDVIEWTIPOSPAGOS.CurrentCell is DataGridViewCheckBoxCell) { bool isChecked = (bool)GRIDVIEWTIPOSPAGOS[e.ColumnIndex, e.RowIndex].EditedFormattedValue; monto = Convert.ToDouble(GRIDVIEWTIPOSPAGOS[2, e.RowIndex].Value.ToString()); if (isChecked == true) { } GRIDVIEWTIPOSPAGOS.EndEdit(); } }
//CONCLUSION DE LA EDICION DEL DATAGRIDVIEW private void dgvStandingOrder_CellEndEdit(object sender, DataGridViewCellEventArgs e) { GRIDVIEWTIPOSPAGOS.CommitEdit(DataGridViewDataErrorContexts.Commit); }