for RuBoard |
The focus of this chapter will be on the requirements, from the ADO.NET perspective, for binding data to various controls such as ListControl s and DataGrid s. Data binding is necessary to link the Web or Windows form's UI controls to the data that is retrieved from a data source. When the control is activated or initiated, an underlying manager goes about initiating whatever was bound to the control (for example, a data retrieval using a SqlDataAdapter that fills a DataSet that is bound to a DataGrid ). The whole binding mechanism does all of the heavy lifting of mapping the control to the data (like a DataSet , DataTable , and so on). What you will see is that if you know how to bind data to a ListBox control, you will also know how to bind data to a ComboBox control, and so on. The Web applications you develop will tend to use read-only list controls with rare update situations. The Windows Forms applications you develop, on the other hand, will be more DataSet -oriented and usually have much more update logic. The basic data binding approach is the same whether you are doing list controls for a Web server or Windows form.
In this hour, you will learn the following topics:
What is meant by binding data to controls
How to bind data to TextBox controls
How to bind data to ListBox es and DataGrid s
An example of a Master/Detail(parent/child) data binding requirement
for RuBoard |