This documentation is archived and is not being maintained.

ErrorProvider.BindToDataAndErrors Method

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

[Visual Basic]
Public Sub BindToDataAndErrors( _
   ByVal newDataSource As Object, _
   ByVal newDataMember As String _
public void BindToDataAndErrors(
 object newDataSource,
 string newDataMember
public: void BindToDataAndErrors(
 Object* newDataSource,
 String* newDataMember
public function BindToDataAndErrors(
   newDataSource : Object,
 newDataMember : String


A data set based on the IList interface to be monitored for errors. Typically, this is a DataSet to be monitored for errors.
A collection within the newDataSource to monitor for errors. Typically, this will be a DataTable.


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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ErrorProvider Class | ErrorProvider Members | System.Windows.Forms Namespace