Export (0) Print
Expand All

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 _
)
[C#]
public void BindToDataAndErrors(
 object newDataSource,
 string newDataMember
);
[C++]
public: void BindToDataAndErrors(
 Object* newDataSource,
 String* newDataMember
);
[JScript]
public function BindToDataAndErrors(
   newDataSource : Object,
 newDataMember : String
);

Parameters

newDataSource
A data set based on the IList interface to be monitored for errors. Typically, this is a DataSet to be monitored for errors.
newDataMember
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.

Requirements

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

Show:
© 2014 Microsoft