Formatting the DataGrid
The DataGrid control can be formatted using many of the techniques mentioned already in this hour. All of the built-in style properties discussed for the DataList are still accessible with the DataGrid with one addition: Because it is possible to edit content directly in the DataGrid, the DataGrid also has a style named EditItemStyle. You can use this to change the appearance of the row currently being modified by a user.
In addition to this type of formatting, you can also tell the DataGrid control to not generate columns automatically and work with the columns directly. This is normally a wise choice; though the automatically generated columns are handy, they will rarely, if ever, be a good choice for a production application. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access