public GridViewDataErrorEventArgs( Exception exception, int columnIndex, int rowIndex, GridViewDataErrorContexts context) { this.exception = exception; this.context = context; this.columnIndex = columnIndex; this.rowIndex = rowIndex; }
private void RaiseError(Exception ex, GridViewDataErrorContexts context) { if (this.raisingException) { return; } this.raisingException = true; if (this.Template == null) { throw new NullReferenceException("The column is not attached to a template! Set the OwnerTemplate property to a valid template."); } int rowIndex = -1; if (this.Template.MasterViewInfo.CurrentRow != null) { rowIndex = this.Template.MasterViewInfo.CurrentRow.Index; } this.Template.EventDispatcher.RaiseEvent <GridViewDataErrorEventArgs>(EventDispatcher.DataError, (object)this.Template, new GridViewDataErrorEventArgs(ex, this.Column.Index, rowIndex, context)); this.raisingException = false; }