| Author: karthikeyan-The Great 07 Oct 2008 | Member Level: Gold | Rating: Points: -20 |
GridView (or DataGrid) DataList Repeater
When we talk about usage of one Data Presentation Controls then many of us get confused about choosing one. When you need to use one of the data Presentation Control then You have to see what kind of behavior you need in your Data Display.
Do you want to show Data in many Pages or in one page? Do you have to Display more then one column in a Row ?
Do you want to have a Row repeating Possibility?
Will users be able to update, Insert and delete the Data?
We are going provide a list of different abilities of Repeater Control, Datalist Control and GridView Control.
Features of a GridView •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
Features of DataList •Directional rendering •Good for columns •Item as cell •Alternate item •Updateable
|
| Author: loki 07 Oct 2008 | Member Level: Bronze | Rating: Points: -20 |
Difference between Datagrid,Datalist and data repeater:
1.Datagrid has paging while Datalist doesnt. 2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid. 3. A repeater is used when more intimate control over html generation is required. 4.When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid. The Repeater repeats a chunk of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default. Out of the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Pagination scheme isn't that hard, so I rarely if ever use a DataGrid. Occasionally I like using a DataList because it allows me to easily list out my records in rows of three for instance.
loki.
|
| Author: Manindra Upadhyay 07 Oct 2008 | Member Level: Gold | Rating: Points: 2 |
use this link
http://www.geekinterview.com/question_details/4560
|