Re: gridview vs Repeater |
| Chirag Bhavsar replied to praveen sinha at 12-May-08 12:19 |
Repeater Control
The Repeater control renders a read-only list from a set of records returned from a data source. Like the FormView control, the Repeater control does not specify a built-in layout. Instead you create the layout for the Repeater control using templates.
For more information, see Repeater Web Server Control.
The GridView control is the successor to the DataGrid control available in earlier versions of ASP.NET. Along with the added ability to take advantage of the capabilities of data source controls, the GridView control offers improvements such as the ability to define multiple primary key fields, improved user interface customization using bound fields and templates, and a new model for handling or canceling 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
Control - Capabilities
GridView - Read/Edit
DataList - Read/Edit
Repeater - Read Only
DetailsView - Read/Edit/Create
FormView - Read/Edit/Create
|
Feature |
Repeater |
DataList |
GridView |
|
Table layout |
No |
No |
Yes |
|
Flow layout |
Yes |
Yes |
No |
|
Column layout |
No |
Yes |
No |
|
Style properties |
No |
Yes |
Yes |
|
Templates |
Yes |
Yes |
Columns/optional |
|
Select/ Edit/Delete |
No |
Yes |
Yes |
|
Sort |
No |
No |
Yes |
|
Paging |
No |
No |
Yes | |
|