Data Binding in Windows Forms

In the last section you learned how to retrieve data from the Customers table in the Northwind database, with barely any code. This is a good thing. Visual Studio .NET helps you do a lot of the repetitive work that you don't really want to, so you have more time to focus on more important aspects of your applications. Data Binding won't be an exception to that statement. Let's take the previous example and learn how to bind it to the UI. Because you now have a table of data to work with, you can display it in the control that is appropriate for that job—the DataGrid.

To shorten the code even further, you can move the DataSet that you declared in the load event earlier, to the Forms Designer. To create a new DataSet ...

Get Microsoft® Visual Basic® .NET 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.