コード例 #1
0
 public GridViewDataErrorEventArgs(
     Exception exception,
     int columnIndex,
     int rowIndex,
     GridViewDataErrorContexts context)
 {
     this.exception   = exception;
     this.context     = context;
     this.columnIndex = columnIndex;
     this.rowIndex    = rowIndex;
 }
コード例 #2
0
ファイル: BoundAccessor.cs プロジェクト: RichardHaggard/BDC
        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;
        }