Difference between DataList and Repeater?ans:Both are similar,except for a difference that Repeater datas can't be edited whereas datalist datas can be edited

Showing Answers 1 - 3 of 3 Answers

Amin

  • Jul 21st, 2006
 

The Default format for repeater contol is normal formate, but in datalist control it is in table format.

  Was this answer useful?  Yes

samiksc

  • Jul 17th, 2007
 

The differences are
1. Repeater is generally used as a read-only forward-only control displaying data items one by one. DataList is used as a read-write control displaying one row of data at a time. Repeater is not used when editing is a requirement.
2. Repeater derives from Control while DataList derives from WebControl. As a result Repeater needs more programming to control the display, generate events etc. and is not used for complex purposes.
3. DataList is flexible in terms of number of data-rows which can be displayed per row. Repeater does not have this facility.
4. Repeater is the only control which allows html start tag to be placed in header item template and end tag to be placed in the footer item template. DataList does not allow this.
5. Repeater has HeaderTemplate, FooterTemplate, ItemTemplate, AlternatingItemTemplate and SeparatorTemplate. DataList has all these 5 templates + SelectedItemTemplate and EditItemTemplate

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.