Thursday, December 22, 2011

ASP.Net DataBound Controls and their Differences

1. GridView
Layouts Has default layout and support custom layout
Events Supported 1. Insert
2. Update
3. Delete
4. Filter
5. Sort
(Renders Multiple records at time)
Additional Information Supports default as well as custom paging. Allows adding custom column and apply custom formatting to columns. Supports Data bound filed, DataControl filed, Command filed and Hyperlink filed.
2. DetailsView
Layouts Has default layout and support custom layout
Events Supported 1. Insert
2. Update
3. Delete
(Renders Single records at a time)
Additional Information Supports default as well as custom paging if underlying data source supports paging. Supports Databound filed, DataControl filed, Command filed and Hyperlink filed.
3. FormView
Layouts Has no default layout and Need to set the custom layout
Events Supported 1. Insert
2. Update
3. Delete
(Renders Single records at a time)
Additional Information Supports default as well as custom paging if underlying data source supports paging. We can also customize the display format of FormView control by using style properties like EditRowStyle, EmptyDataRowStyle, FooterStyle, HeaderStyle, InsertRoStyle and PageStyle
4. Repeater
Layouts The Repeater control dose not have built in rendering of its own, which means we have to provide the layout for the repeater control by creating the Templates
Events Supported Read-only Data Presentation 
Additional Information Repeater control contains Header Template, ItemTemplete and Footer Template. Repeater control dose not support Paging, Insertion,  Selection, Editing, Deleting as this is Read-only data display control
5. DataListView
Layouts Has default layout and support custom layout
Events Supported 1. Insert
2. Update
3. Delete
(Renders Multiple records at a time)
Additional Information DataListView control contains Header Template, Alternate Item Template, ItemTemplete and Footer Template. DataListView dose not support Sorting and Paging but dose support Selection and Editing.
6. ListView
Layouts Has no default layout and Need to set the custom layout
Events Supported 1. Insert
2. Update
3. Delete
4. Filter
5. Sort
(Renders Multiple records at a time)
Additional Information To show the data in the ListView Control we need to use the LayoutTmplete, ItemTempltete.
  

Hope this helps to understand the basic difference between the ASP.Net DataBound Controls

No comments:

Post a Comment