July 2003
Intermediate to advanced
736 pages
16h 35m
English
Binding data to a DataGrid, DataList, or Repeater control is easiest of all. All you have to do is have an object that implements IEnumerable, assign this object to the DataSource property of the prospective control, and invoke DataBind on that control. The ease with which you can get data into these controls in no way mitigates their utility. You can perform mundane tasks, like simply binding a DataView object, or create elaborate, complex interfaces with a bit of clever invention. (Read the Using a DataList Control to Repeat Composite Controls section later in this chapter for more information.)
Refer to Listing 16.4 for a quick example of getting a DataView object into a DataGrid control. Listing 16.7 ...
Read now
Unlock full access