This documentation is archived and is not being maintained.

BindingNavigator Class

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

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

public class BindingNavigator : ToolStrip, 

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

By default, the BindingNavigator control's user interface (UI) is composed of a series of 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 BindingNavigator control. Likewise, there is also a one-to-one correspondence to members within the BindingSource class that programmatically perform the same functionality, as shown in the following table.

UI Control

BindingNavigator member

BindingSource member

Move First



Move Previous



Current Position






Move Next



Move Last



Add New






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

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

  • Create the BindingNavigator with the BindingNavigator(Boolean) constructor, which accepts a Boolean addStandardItems parameter, and set this parameter to false. Then add the desired ToolStripItem objects to the Items collection.

  • If a great deal of customization is desired, or the custom design will be reused, derive a class from BindingNavigator and override the AddStandardItems method to define additional or alternate standard items.

The following code example demonstrates how to use a BindingNavigator control to move through a data set. The set is contained in a DataView, which is bound to a TextBox control with a BindingSource component.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using System.Windows.Forms;

// This form demonstrates using a BindingNavigator to display  
// rows from a database query sequentially. 
public class Form1 : Form
    // This is the BindingNavigator that allows the user 
    // to navigate through the rows in a DataSet.
    BindingNavigator customersBindingNavigator = new BindingNavigator(true);

    // This is the BindingSource that provides data for 
    // the Textbox control.
    BindingSource customersBindingSource = new BindingSource();

    // This is the TextBox control that displays the CompanyName 
    // field from the the DataSet.
    TextBox companyNameTextBox = new TextBox();

    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);

    void Form1_Load(object sender, EventArgs e)
        // Open a connection to the database. 
        // Replace the value of connectString with a valid  
        // connection string to a Northwind database accessible  
        // to your system.
        string connectString =
            "Integrated Security=SSPI;Persist Security Info=False;" +
            "Initial Catalog=Northwind;Data Source=localhost";

        using (SqlConnection connection = new SqlConnection(connectString))

            SqlDataAdapter dataAdapter1 = 
                new SqlDataAdapter(new SqlCommand("Select * From Customers",connection));
            DataSet ds = new DataSet("Northwind Customers");

            // Assign the DataSet as the DataSource for the BindingSource. 
            this.customersBindingSource.DataSource = ds.Tables["Customers"];

            // Bind the CompanyName field to the TextBox control. 
                new Binding("Text",

    public static void Main()
        Application.Run(new Form1());

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0