< Day Day Up > |
Topics in This Chapter
Chapter 11, "ADO.NET." discussed how to access data using ADO.NET. This chapter extends the discussion to describe the techniques by which data is "bound" to the Windows Forms controls that display data. Because all controls derive their data binding capabilities from the base Control class, knowledge of its properties and methods can be applied to all controls. Although many of the same concepts apply to Web controls, data binding for them is discussed separately in Chapter 16, "ASP.NET Web Forms and Controls." Data binding comes in two flavors: simple and complex. Controls that contain one value, such as a label or Textbox, rely on simple binding. Controls populated with rows of data, such as a ListBox, DataGrid, or DataGridView, require complex binding. We'll look at how both are implemented. Of the Windows Forms controls that bind to data, the DataGridView is the most complex and useful. Its layout maps directly to the rows and columns of a relational database or similarly structured XML document. This chapter takes a detailed look at the properties and methods of this control, and provides examples of how this control can be used to implement common database applications. |
< Day Day Up > |