Binding Source

The BindingSource control specifies the data source for a form from the DataSet instances for the project. BindingSource simplifies associating data with controls on a form. It can often be paired with a BindingNavigator.

Although a BindingNavigator control can be bound to any data source, it was designed to integrate with a BindingSource through the BindingNavigator.BindingSource property.

For complex binding scenarios you can optionally set the DataMember property to a specific column or list in the data source. Controls are then bound to the BindingSource. All further interaction with the data is accomplished with calls to the BindingSource component.

Properties

Key properties of the BindingSource control include:

  • DataMember. Specifies a specific column or list in the data source to which the BindingSource is bound.

  • DataSource. Specifies the data source for the BindingSource from the DataSets for your project.

  • Filter. Specifies a database column expression used to filter the set of rows returned by the data source.

Events

Events can be configured for the BindingSource to specify the behaviour of the control. For example, an action can be configured to occur when data has been exchanged between the data source and a control property bound to the data using the BindingComplete event property.

For information on configuring events and other components of the design using a script, see: Working with Scripts.

Adding a BindingSource

When you drag a BindingSource control to a form in the Flow Designer, a control will appear in the design space. Select the control and configure the details in the Properties pane.

Importantly, set the DataSource field to the data set for the BindingSource. Optionally, you can set the binding to a specific DataMember.

When a DataSource has been set, you can pair the BindingSource control with a BindingNavigator. To do this, with the relevant BindingNavigator selected, set the BindingSource in the BindingSource field of the Properties pane.

Information on the properties and events for the BindingSource control can be viewed at the link to Microsoft® Documentation.