GridView supports:
- sorting by click
- paging
- editing
- selection
- template-based layout (rendered within
<table>
)
ListView supports:
- List item
- paging (need to use DataPager)
- editing
- selection
- sorting by click (need to create an event handler manually)
- template-based layout (rendered as you want it + provides more templates, e.g. - GroupTemplate)
The reason to use ListView would be if you need some special layout, for example, to create a table that places more than one item in the same row, or to break free from table-based rendering altogether) - which is not possible with GridView.
Using GridView on the other hand is easier and faster, so unless you need special layout to display your data, use GridView.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…