Ler em inglês Editar

Compartilhar via


ErrorProvider.BindToDataAndErrors(Object, String) Method

Definition

Provides a method to set both the DataSource and DataMember at run time.

public void BindToDataAndErrors (object newDataSource, string newDataMember);
public void BindToDataAndErrors (object? newDataSource, string? newDataMember);

Parameters

newDataSource
Object

A data set based on the IList interface to be monitored for errors. Typically, this is a DataSet to be monitored for errors.

newDataMember
String

A collection within the newDataSource to monitor for errors. Typically, this will be a DataTable.

Remarks

To avoid conflicts at run time that can occur when changing DataSource and DataMember, you should use BindToDataAndErrors instead of setting DataSource and DataMember individually.

Applies to

Produto Versões
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9