Skip to main content
A newer version of this page is available. .

DataNavigator() Constructor

Creates a new DataNavigator object.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

public DataNavigator()

Remarks

Use this constructor to create and initialize a new DataNavigator class instance. The constructor initializes the data navigator control with the default settings.

Example

The following code shows how to create a new DataNavigator control, bind it to a data source and specify custom images for the control’s buttons at runtime. The custom images are stored in an ImageCollection object.

DataNavigator ctor

using DevExpress.XtraEditors;

private void CreateDataNavigator() {
    // Create a new DataNavigator control
    DataNavigator dataNavigator = new DataNavigator();
    Controls.Add(dataNavigator);
    dataNavigator.Height = 40;
    dataNavigator.Dock = DockStyle.Bottom;
    // Bind to a data source
    dataNavigator.DataSource = productsBindingSource;
    // Specify the ImageCollection that stores custom images for the DataNavigator's buttons
    dataNavigator.Buttons.ImageList = imageCollection1;
    for (int i = 0; i < dataNavigator.Buttons.ButtonCollection.Count; i++) {
        dataNavigator.Buttons.ButtonCollection[i].ImageIndex = i;
    }
    dataNavigator.ShowToolTips = true;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataNavigator() constructor.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also