Chapter 4. Creating Data Entry Forms with Built-In Controls
If you have built Access applications in the past, you know that forms in Access have a nice record navigation box at the bottom (if you don’t shut it off) and that navigation box holds controls that allow you to move between records, add records, delete records, etc. If you have been using this, the inconvenience of not having that built-in functionality in form design will definitely be felt when developing in .NET. But the good news is that using the built-in navigation controls in C# is much easier than what you built in Chapter 4. Also, you will have the same type of control over the data as you had in the last chapter.
To get started, go into Visual Studio and create a new Windows Forms Application. I called mine UsingDataControls. Given the data that you will be working with, stretch the form to be a little wider and taller. Next, go to the top menus and select Data→Show Data Sources (or press Shift+Alt+D). You will see the box shown in Figure 4-1.

Figure 4-1. No data sources, yet
Click on the hyperlink that reads Add New Data Source... and you will see the dialog shown in Figure 4-2. You will have several options depending on what you have available with your configuration of Visual Studio. In this case, the choices were Database, Service, Object, and SharePoint. You will be using a database here, so select Database ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access