Specifying the Columns That Appear in the DataGrid
As previously discussed, the DataGrid displays the data that has been bound to it using an HTML <table> tag, where each field in its DataSource is rendered as a column in the HTML <table>, and each row in the DataSource is rendered as a row in the HTML <table>. (The data the DataGrid is bound to is commonly referred to as the DataSource because the data is bound to the DataGrid by setting the DataGrid's DataSource property.)
Recall from Hour 13, “An Introduction to Databases,” that “field” is a synonym for “columns” when talking about database table columns. Since the DataGrid produces HTML <table> ... |
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.