DataGrid Control

You are likely to use the DataGrid control to display fields of a DataSource when you want to display them as columns in a table. Each row in the DataGrid control, as with Repeater and DataList controls, represents a record in the DataSource. The DataGrid control is richer than the Repeater and the DataList. It supports selections, editing, deleting, paging, and sorting.

Five different column types are available for the DataGrid control. They can be seen in Table 10.3.

Table 10.3. The DataGrid Column Types
Column Type Description
Bound Column Displays a column bound to a field in a data source. It displays each item in the field as text. This is the default column type of the DataGrid control.
Button Column Displays a command ...

Get Special Edition Using® Microsoft® ASP.NET 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.