You can also define an event handler that responds when a user clicks the column header button.
The event handler can perform operations like sorting the data that is displayed in the Grid View according to the contents of a column.
For more information, see Grid View Column Header Styles and Templates Overview.
To add visual elements, such as Check Box and Button controls, to a Grid View view mode, use templates or styles.
The following classes support the Grid View view mode.Note The feedback system for this content will be changing soon. If content within a comment thread is important to you, please save a copy.For more information on the upcoming change, we invite you to read our blog post.To prevent alignment issues between column headers and cells, do not set a property or specify a template that affects the width of an item in an Item Container Style.For example, do not set the Margin property or specify a Control Template that adds a Check Box to an Item Container Style that is defined on a List View control.You can also dynamically add, remove, replace, and reorder columns because this functionality is built into Grid View.However, Grid View cannot directly update the data that it displays.Do not use the Horizontal Content Alignment and Vertical Content Alignment properties for List View content that is displayed by using a Grid View.To specify template and style properties for column headers, use the Grid View, Grid View Column, and Grid View Column Header classes.The default Grid View style implements buttons as column headers.By using buttons for column headers, you can implement important user interaction capabilities; for example, users can click the column header to sort Grid View data according to the contents of a specific column.