Navigate a Dataset
This exercise describes how to bind a NavigationBar to the dataset of a DataGrid:
- Click and drag a NavigationBar from the Toolbox to the Design Sheet, above the DataGrid you want to navigate:
- To bind the NavigationBar to a dataset, select Set Data Binding from the control drop-down menu:
- Select the name of the dataset you bound to the DataGrid:
- Save your changes and click Run to run the form:
- The DataGrid and the Navigation Bar are both bound to the same dataset. Click the buttons on the navigation bar to move between rows. The DataGrid is scrolled accordingly:
The binding is shown on the NavigationBar: