public string GetError(int boundColumnIndex, int columnIndex, int rowIndex) { IDataErrorInfo info = null; try { info = this.currencyManager[rowIndex] as IDataErrorInfo; } catch (Exception exception) { if (System.Windows.Forms.ClientUtils.IsCriticalException(exception) && !(exception is IndexOutOfRangeException)) { throw; } DataGridViewDataErrorEventArgs e = new DataGridViewDataErrorEventArgs(exception, columnIndex, rowIndex, DataGridViewDataErrorContexts.Display); this.owner.OnDataErrorInternal(e); if (e.ThrowException) { throw e.Exception; } } if (info != null) { return info[this.props[boundColumnIndex].Name]; } return string.Empty; }
void gridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { Log.Exception(e.Exception); }
private void dgv_GroupManage_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
// Handle the useless error messagebox created by microsoft that spam for nothing. private void dtgUsers_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = true; }
private void receiptDetailsDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.ThrowException = false; }
// Контроль значений в таблице оценки private void ValuesGrid_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show(Localization.GetText("IncorrectValueError", al), ProgramDescription.AssemblyTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
private void Grid_DataError(object sender, DataGridViewDataErrorEventArgs e) { //MessageBox.Show(e.RowIndex.ToString() + " ;"+e.ColumnIndex.ToString() +"\n"+e.Context, "Ошибка DataGrid"); }
private void dgvSalida_DataError(object sender, DataGridViewDataErrorEventArgs anError) { MessageBox.Show("Seleccione un elemento de la lista", "Aviso"); }
private void gvOrderDetails_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Data error! You does not import corect data type!", "Invalid value"); e.Cancel = true; }
private void DataGridViewItemsDataError(object sender, DataGridViewDataErrorEventArgs e) { Program.Provider.Logger.Log("Error in Audit Closing Form Data Grid", e.Exception); }
private void grdUsers_DataError(object sender, DataGridViewDataErrorEventArgs e) { //show this message when the user enter incorrect value in a cell MessageBox.Show(GlobalSetting.ResManager.GetString("CellDataError"), "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); }
/// <summary> /// Permite capturar el error e informale al usuario. /// </summary> /// <param name="sender">Representa una referencia al objeto que lanza ese evento.</param> /// <param name="e">Contiene los eventos lanzados por el control.</param> private void gvDatos_DataError(object sender, DataGridViewDataErrorEventArgs e) { _ArchivoErrores = new LogErrores(); _ArchivoErrores.escribir("frmBuscador", "gvDatos_DataError", e.Exception.ToString()); MessageBox.Show(string.Format("La cadena de entrada no tiene el formato correcto.", e.ColumnIndex, e.RowIndex), "Buscador", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}//SaleDGV_CellEndEdit /// <summary> /// Событие для обработки стандартного сообщения об ошибке. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ReturnDGV_DataError(object sender, DataGridViewDataErrorEventArgs e) { //Подаём звуковой сигнал и запрещаем выходи из ячейки System.Media.SystemSounds.Beep.Play(); e.Cancel = true; }//ReturnDGV_DataError
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = false; }
public void ProcessException(Exception exception, DataGridViewCellCancelEventArgs e, bool beginEdit) { DataGridViewDataErrorEventArgs args = new DataGridViewDataErrorEventArgs(exception, e.ColumnIndex, e.RowIndex, DataGridViewDataErrorContexts.Commit); this.owner.OnDataErrorInternal(args); if (args.ThrowException) { throw args.Exception; } if (args.Cancel) { e.Cancel = true; if (beginEdit) { IEditableObject current = this.currencyManager.Current as IEditableObject; if (current != null) { current.BeginEdit(); } } } else { this.CancelRowEdit(false, false); } }
private void типТСDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Ошибка!"); }
private void dvUnitRoute_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void resolveDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void Dgv_guize_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void dataGridViewDiscip_DataError(object sender, DataGridViewDataErrorEventArgs e) { dataGridViewDiscip.CancelEdit(); }
private void dgDefinitions_DataError(object sender, DataGridViewDataErrorEventArgs e) { log.Debug(e.ToString()); e.Cancel = true; }
/// <summary> /// 数据类型验证失败 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgView_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.ThrowException = false; e.Cancel = false; }
private void dataGridView2_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void metroGrid1_DataError(object sender, DataGridViewDataErrorEventArgs e) { PanException.metroGrid1_DataError(this.MdiParent, sender, e); }
private void dvDestIrons_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void ly_lsptbDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = false; }
private void dgvTraitsAllowed_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Incorrect Data Type"); }
private void dgvStore_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = true; }
private void Sesiones_Grid_DataError(object sender, DataGridViewDataErrorEventArgs e) { }
private void UsersDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { UsersDataGridView[e.ColumnIndex, e.RowIndex].Value = null; }
public object GetValue(int boundColumnIndex, int columnIndex, int rowIndex) { object obj2 = null; try { obj2 = this.props[boundColumnIndex].GetValue(this.currencyManager[rowIndex]); } catch (Exception exception) { if (System.Windows.Forms.ClientUtils.IsCriticalException(exception) && !(exception is IndexOutOfRangeException)) { throw; } DataGridViewDataErrorEventArgs e = new DataGridViewDataErrorEventArgs(exception, columnIndex, rowIndex, DataGridViewDataErrorContexts.Display); this.owner.OnDataErrorInternal(e); if (e.ThrowException) { throw e.Exception; } } return obj2; }
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { //Nic nie ma robić... }
private void orderDetailListDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = true; }
void dataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Wrong format"); }