Microsoft 9GD00001 Computer Accessories User Manual


 
236 Microsoft Visual Studio 2010: A Beginner’s Guide
Figure 8-11 Choosing a new data source
On the Select The Data Objects window, check the box next to each object you want
to bind in your application. The example in this chapter uses Customer and Order objects,
which you can see checked in Figure 8-12. Clicking Finish will configure the data source
for use in the application. You can view data sources by selecting Data | Show Data
Sources, shown in Figure 8-13.
The Data Sources window allows you to create controls on a form that are bound
to each field of a data source. In the Data Sources window in Figure 8-13, you can see
that both Customer and Object are listed with their fields. What is also evident is the
icons associated with each field. The icons describe what type of control should be
associated with each data field. For example, Name on Customer is a TextBox because it is
nvarchar(50), but Birthday is a calendar because it is a datetime. If you don’t like a default
control type for a field, you can change it by selecting the field and choosing another
control type from the drop-down list, as shown in Figure 8-14.