BindingNavigator Constructors

Definition

Initializes a new instance of the BindingNavigator class.

Overloads

BindingNavigator()

Initializes a new instance of the BindingNavigator class.

BindingNavigator(Boolean)

Initializes a new instance of the BindingNavigator class, indicating whether to display the standard navigation user interface (UI).

BindingNavigator(IContainer)

Initializes a new instance of the BindingNavigator class and adds this new instance to the specified container.

BindingNavigator(BindingSource)

Initializes a new instance of the BindingNavigator class with the specified BindingSource as the data source.

BindingNavigator()

Source:
BindingNavigator.cs
Source:
BindingNavigator.cs
Source:
BindingNavigator.cs

Initializes a new instance of the BindingNavigator class.

C#
public BindingNavigator ();

Remarks

The parameterless constructor sets the BindingSource property to null. This constructor is equivalent to calling the BindingNavigator(Boolean) constructor with a parameter value of false. You can add the standard items by making a separate call to AddStandardItems.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

BindingNavigator(Boolean)

Source:
BindingNavigator.cs
Source:
BindingNavigator.cs
Source:
BindingNavigator.cs

Initializes a new instance of the BindingNavigator class, indicating whether to display the standard navigation user interface (UI).

C#
public BindingNavigator (bool addStandardItems);

Parameters

addStandardItems
Boolean

true to show the standard navigational UI; otherwise, false.

Remarks

This constructor sets the BindingSource property to null. If AddStandardItems is false, AddNewItem, MoveFirstItem, MoveLastItem, MoveNextItem, MovePreviousItem, DeleteItem, CountItem and PositionItem will also be null.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

BindingNavigator(IContainer)

Source:
BindingNavigator.cs
Source:
BindingNavigator.cs
Source:
BindingNavigator.cs

Initializes a new instance of the BindingNavigator class and adds this new instance to the specified container.

C#
public BindingNavigator (System.ComponentModel.IContainer container);

Parameters

container
IContainer

The IContainer to add the new BindingNavigator control to.

Remarks

This constructor is provided as a convenience, combining the steps of creating a new BindingNavigator control and adding it to a parent IContainer. Like the parameterless constructor, it sets the BindingSource property to null and does not show the standard user interface.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

BindingNavigator(BindingSource)

Source:
BindingNavigator.cs
Source:
BindingNavigator.cs
Source:
BindingNavigator.cs

Initializes a new instance of the BindingNavigator class with the specified BindingSource as the data source.

C#
public BindingNavigator (System.Windows.Forms.BindingSource bindingSource);
C#
public BindingNavigator (System.Windows.Forms.BindingSource? bindingSource);

Parameters

bindingSource
BindingSource

The BindingSource used as a data source.

Remarks

This constructor uses the BindingSource parameter to initialize the BindingSource property. It also adds the standard set of navigational buttons and sets their corresponding properties, such as CountItem and MoveNextItem.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9