Use the AlternatingItemTemplate property to define a custom user interface (UI) for the alternating data item. The AlternatingItemTemplate template usually contains the same controls and content as the ItemTemplate template, but with a different appearance to distinguish items.
To specify the custom template declaratively, add an AlternatingItemTemplate element inside the ListView control. Then add controls and content between the opening and closing <AlternatingItemTemplate> tags. To display the field values from the data source, use a data-binding expression. For more information, see Data-Binding Expressions Overview.
To create buttons that automatically select, delete, and edit operations, add a button control to the template. Set its CommandName property to one of the values listed in the following table.
Button type
|
CommandName value
|
|---|
Delete
|
"Delete"
|
Edit
|
"Edit"
|
Select
|
"Select"
|