Differences between Datagrid, Datalist and Repeater?
1. Datagrid has paging while Datalist
doesnt.
2. Datagrid has built in paging,
sorting and editing capabilities which are not there with the other two
controls. So if you want users to sort / page / edit data, datagrid is the
natural choice.
3. Datagrid Data can be export to
Excel.
Datalist has a property called repeat.
Direction = vertical/horizontal. (This is of great help in designing layouts).
This is not there in Datagrid.
Repeater is the most customizable. No
default output
All are similar in that they have a datasource property and ItemCreated,
ItemDataBound and ItemCommand events.
Features of Datagrid
•Displays
data as a table
•Control
over
–Alternate item
–Header
–Footer
–Colors, font,
borders, etc.
–Paging
•Updateable
•Item
as row
Features of Repeater
•List
format
•No
default output
•More
control
•More
complexity
•Item
as row
•Not
updateable
Features of DataList
- Directional rendering
- Good for columns
- Item as cell
- Alternate item
- Updateable