Thursday 25 April 2013

DataList, Repeater and FormView and Details View Controls

Today, I practiced some examples using Data List Control, Repeater and FormView Controls in Asp.Net.
 
DataList Control: 

Datalist control is similar to gridview except that it has no predefined layout and hence it can be designed in any layput you want, which is not possible with gridview because it has predefined table layout. It doesn't support paging and sorting wheareas gridview supports paging and sorting.

Repeater:

Repeater control can display multiple rows to gridiew and datalist. But unlike gridview and datalist the data in repeater is readonly.Similar to datalist it has no predefined layout and you can design it with any layout. As repeater is readonly, it has very limited set of properties, methods and events and hence it is very light weight and provides fast access, it has the important properties DatasourceId and Datasource. It has only one important event ItemCommand that will be raised when user click on any button within the repeater.