DXErrorProvider.BindToDataAndErrors(Object, String) Method

Sets the data source to be monitored for errors.

Namespace: DevExpress.XtraEditors.DXErrorProvider

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

public void BindToDataAndErrors(
    object newDataSource,
    string newDataMember
)
Public Sub BindToDataAndErrors(
    newDataSource As Object,
    newDataMember As String
)

Parameters

Name Type Description
newDataSource Object

A data set to be monitored for errors. This value is used to initialize the DXErrorProvider.DataSource property.

newDataMember String

The name of the specified data set member. This value is used to initialize the DXErrorProvider.DataMember property.

Remarks

To avoid conflicts that can occur at run time, when changing DXErrorProvider.DataSource and DXErrorProvider.DataMember, you need to use the BindToDataAndErrors method instead of setting DXErrorProvider.DataSource and DXErrorProvider.DataMember individually.

Refer to the DXErrorProvider.DataSource topic for information on handling errors on the data source level.

See Also