System.Windows.Forms.BindingNavigator Class

Represents the navigation and manipulation user interface (UI) for controls on a form that are bound to data.

See Also: BindingNavigator Members

Syntax

[System.ComponentModel.Designer("System.Windows.Forms.Design.BindingNavigatorDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.ComponentModel.DefaultProperty("BindingSource")]
[System.ComponentModel.DefaultEvent("RefreshItems")]
[System.Runtime.InteropServices.ComVisible(true)]
public class BindingNavigator : ToolStrip, System.ComponentModel.ISupportInitialize

Remarks

The System.Windows.Forms.BindingNavigator control represents a standardized way to navigate and manipulate data on a form. In most cases, a System.Windows.Forms.BindingNavigator is paired with a System.Windows.Forms.BindingSource control to move through data records on a form and interact with them. In these cases, the BindingNavigator.BindingSource property is set to the associated System.Windows.Forms.BindingSource component that acts as a data source.

By default, the System.Windows.Forms.BindingNavigator control's user interface (UI) is composed of a series of System.Windows.Forms.ToolStrip buttons, text boxes, and static text elements for most common data-related actions, such as adding data, deleting data, and navigating through data. Each of these controls can be retrieved or set through an associated member of the System.Windows.Forms.BindingNavigator control. Likewise, there is also a one-to-one correspondence to members within the System.Windows.Forms.BindingSource class that programmatically perform the same functionality, as shown in the following table.

Move First

BindingNavigator.MoveFirstItem

BindingSource.MoveFirst

Move Previous

BindingNavigator.MovePreviousItem

BindingSource.MovePrevious

Current Position

BindingNavigator.PositionItem

BindingSource.Current

Count

BindingNavigator.CountItem

BindingSource.Count

Move Next

BindingNavigator.MoveNextItem

BindingSource.MoveNext

Move Last

BindingNavigator.MoveLastItem

BindingSource.MoveLast

Add New

BindingNavigator.AddNewItem

BindingSource.AddNew

Delete

BindingNavigator.DeleteItem

BindingSource.RemoveCurrent

Adding a System.Windows.Forms.BindingNavigator control to a form and binding it to a data source, such as a System.Windows.Forms.BindingSource, will automatically establish the relationships in this table.

You can use one of the following techniques to customize this toolbar:

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0