Friday, June 13, 2008

Dataset, Repeater and List control Difference?

Type of Control Purpose Features
Table • General-purpose, programmable table. • Can display any combination of HTML text and controls.
• Supports a TableCell control that can be set to display information. Does not use templates for display.
• Is not inherently data-bound.
• Exposes a model for dynamically creating rows (TableRow controls) and cells (TableCell controls).
Repeater • Simple, read-only output • Has no built-in support for selecting or editing items.
• Has no default appearance; you must lay out the list by creating templates. The list can be vertical, horizontal, all on one line, or in any format you specify.
• Has no default paging; all data is displayed in a single list.
• Can define separators between elements using a template.
• Supports custom functionality that can be applied to items (for example, specifying an "Add to shopping cart" button for each item).
DataList • List output with editing
• Non-tabular lists (for example, comma-delimited lists)
• Easily customizable output • Has a table appearance by default, but can be configured to show any list output.
• Can customize look of list extensively.
• Has an auto-format option.
• WYSIWYG template editing.
• Supports styles for custom look of items.
• Can define separators between elements using a template.
• Has editable contents (contents displayed in text boxes or other controls, based on data type of bound data).
• Supports single selection. Multiple selection requires custom code.
• Supports either horizontal (columns) or vertical (rows) layout of the data items.
• Has no default paging; all data is displayed in a single list.
• Supports custom functionality that can be applied to items (for example, specifying an "Add to shopping cart" button for each item).
DataGrid • Full-featured list output with editing
• Paged reporting • Has a grid appearance by default.
• Can customize look of grid extensively.
• Has an auto-format option.
• Can specify output using bound columns, columns of buttons or hyperlinks, and custom columns created using templates.
• Has no separator template. However, the grid renders in a table, and you can specify table border size and color.
• Supports WYSIWYG template editing.
• Items support styles for custom look.
• Can edit, update, and delete contents.
• Supports single selection. Multiple selection requires custom code.
• Has optional paged output.
• Supports sorting.
• Supports custom functionality that can be applied to items (for example, specifying an "Add to shopping cart" button for each item).

No comments: