2.3 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||||
|---|---|---|---|---|---|---|---|---|---|
| Move Through a DataSet with BindingNavigator Control | 03/30/2017 |
|
|
146d97be-3d97-400e-accb-860bbf47729d |
How to: Move Through a DataSet with the Windows Forms BindingNavigator Control
As you build data-driven applications, you will often need to display collections of data to users. The xref:System.Windows.Forms.BindingNavigator control, in conjunction with the xref:System.Windows.Forms.BindingSource component, provides a convenient and extensible solution for moving through a collection and displaying items sequentially.
Example
The following code example demonstrates how to use a xref:System.Windows.Forms.BindingNavigator control to move through data. The set is contained in a xref:System.Data.DataView, which is bound to a xref:System.Windows.Forms.TextBox control with a xref:System.Windows.Forms.BindingSource component.
Note
Storing sensitive information, such as a password, within the connection string can affect the security of your application. Using Windows Authentication (also known as integrated security) is a more secure way to control access to a database. For more information, see Protecting Connection Information.
[!code-csharpSystem.Windows.Forms.DataNavigator#1] [!code-vbSystem.Windows.Forms.DataNavigator#1]
Compiling the Code
This example requires:
- References to the System, System.Data, System.Drawing, System.Windows.Forms and System.Xml assemblies.