Binding Templated Columns

A templated column is recognized by the <TemplateColumn> tag. The body of the tag contains from one through four different templates: ItemTemplate, Edit­ItemTemplate, HeaderTemplate, and FooterTemplate. You can tell from these names that the tag lacks a specific template for the alternating item and selected item. Alternating and selected items typically differ from other items only in terms of graphical settings such as background and foreground color and font styles, and such graphical settings can be easily set for any item at the DataGrid control level by using the <AlternatingItemStyle> and <SelectedItemStyle> tags. You will typically not need to change the layout of a column when one of its cells is selected or ...

Get Building Web Solutions with ASP.NET and ADO.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.