private void C_Save_Click(object sender, EventArgs e) { DGV.EndEdit(); //MessageBox.Show(DGV.CurrentCell.Value.ToString()); DGV.RefreshEdit(); if (check()) { if (con.update(ds, "tb_Access_Methods")) { MessageBox.Show("Updated"); this.A_FRM_Load(sender, e); } } }
private void C_Save_Click(object sender, EventArgs e) { DGV.EndEdit(); //MessageBox.Show(DGV.CurrentCell.Value.ToString()); DGV.RefreshEdit(); if (check()) { if (con.update(ds, "tb_Operations_Skills_Description")) { MessageBox.Show("Updated"); this.A_FRM_Operation_Skills_Desc_Load(sender, e); } } }
private void DGV_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { if (e.ColumnIndex == DGV.Columns["Asignar"].Index) { DGV.EndEdit(); //Stop editing of cell. if ((bool)DGV.Rows[e.RowIndex].Cells["Asignar"].Value) { _controlador.Marcar(); } else { _controlador.DesMarcar(); } } } }
private void DGV_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (DGV[e.ColumnIndex, e.RowIndex].IsInEditMode) { if (e.ColumnIndex == 3) { object value = DGV[e.ColumnIndex, e.RowIndex].Value; int parid = int.Parse(DGV[1, e.RowIndex].Value.ToString().Trim(new char[] { '$' })); string error = Core.ValidateConfig(parid, value); if (error != null) { MessageBox.Show(error, Strings.WarnMessageBoxHeader, MessageBoxButtons.OK, MessageBoxIcon.Warning); e.Cancel = true; DGV.CancelEdit(); DGV.EndEdit(); } } } }