Редагувати

Поділитися через


Windows Forms Data Binding

Data binding in Windows Forms gives you the means to display and make changes to information from a data source in controls on the form. You can bind to both traditional data sources as well as almost any structure that contains data.

In This Section

Data Binding and Windows Forms
Provides an overview of data binding in Windows Forms.

Data Sources Supported by Windows Forms
Describes the data sources that can be used with Windows Forms.

Interfaces Related to Data Binding
Describes several of the interfaces used with Windows Forms data binding.

How to: Navigate Data in Windows Forms
Shows how to navigate through items in a data source.

Change Notification in Windows Forms Data Binding
Describes different types of change notification for Windows Forms data binding.

How to: Implement the INotifyPropertyChanged Interface
Shows how to implement the INotifyPropertyChanged interface. The interface communicates to a bound control the property changes on a business object

How to: Apply the PropertyNameChanged Pattern
Shows how to apply the PropertyNameChanged pattern to properties of a Windows Forms user control.

How to: Implement the ITypedList Interface
Shows how to enable discovery of the schema for a bindable list by implementing the ITypedList interface.

How to: Implement the IListSource Interface
Shows how to implement the IListSource interface to create a bindable class does not implement IList, but provides a list from another location.

How to: Ensure Multiple Controls Bound to the Same Data Source Remain Synchronized
Shows how to handle the BindingComplete event to ensure all controls bound to a data source remain synchronized.

How to: Ensure the Selected Row in a Child Table Remains at the Correct Position
Shows how to ensure the selected row of a child table does not change, when a change is made to a field of the parent table.

Also see Interfaces Related to Data Binding, How to: Navigate Data in Windows Forms, and How to: Create a Simple-Bound Control on a Windows Form.

Reference

System.Windows.Forms.Binding
Describes the class that represents the binding between a bindable component and a data source.

System.Windows.Forms.BindingSource
Describes the class that encapsulates a data source for binding to controls.

BindingSource Component
Contains a list of topics that demonstrate how to use the BindingSource component.

DataGridView Control
Provides a list of topics that demonstrate how to use a bindable datagrid control.

Also see Accessing Data in Visual Studio.