BindingNavigator.BindingSource Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the System.Windows.Forms.BindingSource component that is the source of data.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

public BindingSource BindingSource { get; set; }
/** @property */
public BindingSource get_BindingSource ()

/** @property */
public void set_BindingSource (BindingSource value)

public function get BindingSource () : BindingSource

public function set BindingSource (value : BindingSource)

Property Value

The System.Windows.Forms.BindingSource component associated with this BindingNavigator. The default is a null reference (Nothing in Visual Basic).

The BindingSource property represents the data source that the BindingNavigator navigates through. More specifically, the List property of the BindingSource represents the actual data list.

This is the default property for the BindingNavigator class.

The following code example demonstrates how to use a BindingNavigator control to move through the results of a database query. The result set is contained in a DataSet, which is bound to a TextBox control with a BindingSource component. This code example is part of a larger example provided in How to: Move Through a DataSet with the Windows Forms BindingNavigator Control.

public Form1()
    // Set up the BindingSource component.
    this.customersBindingNavigator.BindingSource = this.customersBindingSource;
    this.customersBindingNavigator.Dock = DockStyle.Top;

    // Set up the TextBox control for displaying company names.
    this.companyNameTextBox.Dock = DockStyle.Bottom;

    // Set up the form.
    this.Size = new Size(800, 200);
    this.Load += new EventHandler(Form1_Load);

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions