The DataGriditem class inherits from the TableRow class, that is, every DataGridItem's instance can be seen as a line in a table. This is because DataGrid is designed to display data in the form of a
tag in HTML, so each record is a table. Repeater is designed to freely define data output. So, RepeaterItem does not inherit it is not surprising from TableRow.
The DataList and Repeater controls must use templates to output data, while DataGrid allows only templates to display only by templateColumn.
DataGrid and DataList are inherited from the WebControl class, while Repeater is inheriting from the Control class. The WebControl class contains some properties for beautification, such as Backcolor, Forecolor, CssClass, BorderStyle, and more. This shows that when using DataGrid or DataList, you can set these properties to personalize output. The Repeater control does not have these properties.
The second defect in DataGrid is its performance. In three data controls, DataGrid is the worst relative performance. ViewState generated by DataGrid will be quite large, especially when DataGrid contains more rows. Of course, you can also close the ViewState feature, but the price is that you will not be able to use sort, pagination, and record editing.
By default, DataList will display the record in the HTML table. However, by setting the RepeatColumn property, you can set how many records displayed in a row. Further, you can even specify that the content of the DatList is not displayed in the table, but in the tab. This can be implemented by setting the REPEARLAYOUT attribute.
Repeater has no style attributes available.
DataGrid provides the most features, such as allowing visitors to edit, sort or paginize records. At the same time, it is also the easiest to use, even simply to add it to the page without having to write code. However, these ease of use is at the expense of performance. DataGrid is the lowest efficiency in three controls, especially when using Web Form.
By using templates, DataList provides more excellent interface effect than DataGrid. However, this needs to be at the expense of certain development times. In order to add sort, paging, and editing, the programmer has to spend more energy than using DataGrid, although its performance is better than DataGrid.
Finally, Repeater allows the maximum HTML customization for data records. Typically, use Repeater to display data records than to use DataGrid and DataList to take longer development time. In addition, it does not support built-in editing, sorting, and paging features. Fortunately, Repeater is superior to the other two controls in performance, especially better than DataGrid.
WAST test setting
Test code http://download.microsoft.com/download/9/e/9/9E97B2F8-B317-4751-9AC1-2E34EEBEC26A/DataControlsperftest_setup.msi Click here to download