Q&A

Q1:In this chapter we saw how to bind a DataReader to a DataGrid. Other than the DataReader and DataSet, are there other types of objects that can be bound to a DataGrid?
A1: A number of other objects can be bound to a DataGrid. For example, there are a bevy of classes in the .NET Framework referred to as collection classes, which are used to store an arbitrary number of items. Instances of these classes can be bound to a DataGrid.

While there are other objects that can participate in data binding, DataSet and DataReaders are the most commonly used. This is because DataGrids are most often used to display database data, which is retrieved through DataReaders and DataSets.

Q2:What other DataGrid columns are there besides the Bound Column?

Get SAMS Teach Yourself ASP.NET in 24 Hours 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.