共用方式為


ErrorAddDataBoundRowEventArgs.InnerException Property

Definition

Gets the Exception instance that caused the current exception.

public:
 property Exception ^ InnerException { Exception ^ get(); };
public Exception InnerException { get; }
member this.InnerException : Exception
Public ReadOnly Property InnerException As Exception

Property Value

An instance of Exception that describes the error that caused the current exception.

Remarks

The ErrorAddDataBoundRow event is raised as a direct result of an exception while attempting to add a new row to the data source. Use the InnerException property to obtain the exception that led to this error. For example, if the DataTable that is bound to the ListObject control does not allow a column to be null, and the user does not specify a value for this column, the attempt to add the row causes a NoNullAllowedException to be raised.

Applies to