View Single Post
  #2 (permalink)  
Old 07-27-2007, 06:07 AM
Shanthi Shanthi is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 346
Shanthi is on a distinguished road
Smile Re: What is the difference between repeater over datalist and datagrid?

Datagrid is most restrictive as regards to customization followed by DataList and finally Repeater is the most customizable.

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.

DataList and repeater have better performance than datagrid. So if performance is a major concern, for example, a site with large number of concurrent visitors, then you could think of datalist or repeater.

Repeater is the most customizable. It allows you to create structures like nested lists, for example.

A datagrid row displays one record from the data source, while a datalist row can display more than one records (set by RepeatColumns property)

Datagrid and Datalist are derived from WebControl while Repeater is not, and so does not have the stylistic properties of web controls.

All are similar in that they have a datasource property and ItemCreated, ItemDataBound and ItemCommand events.


-Shanthi
Reply With Quote