Back to Devexpress

ObjectDataSource.BeforeFill Event

corelibraries-devexpress-dot-dataaccess-dot-objectbinding-dot-objectdatasource.md

latest3.2 KB
Original Source

ObjectDataSource.BeforeFill Event

Occurs before filling an object data source, which enables you to provide custom data source validation.

Namespace : DevExpress.DataAccess.ObjectBinding

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
public event BeforeFillEventHandler BeforeFill
vb
Public Event BeforeFill As BeforeFillEventHandler

Event Data

The BeforeFill event's data class is BeforeFillEventArgs. The following properties provide information specific to this event:

PropertyDescription
ConstructorInfoReturns an object providing access to constructor parameters of an ObjectDataSource.
DataMemberReturns the data member specified for an ObjectDataSource.
DataSourceReturns the data source assigned to an ObjectDataSource.
IsValidSpecifies whether or not the object data source is valid.
ParametersReturns a collection of method and constructor parameters of an ObjectDataSource.

Remarks

The BeforeFill event occurs before filling an object data source.

If the BeforeFillEventArgs.IsValid property returns false , a ValidationFailedException is thrown.

Important

BeforeFillEventArgs.IsValid is false if the object data source uses an untrusted data source type.

To validate all object data sources in an entire application, handle the ObjectDataSource.BeforeFillGlobal event.

See Also

ValidationFailedException

ObjectDataSource Class

ObjectDataSource Members

DevExpress.DataAccess.ObjectBinding Namespace