8.06.2012

ASP.NET Difference FAQs-6

1.Difference between DataGrid and GridView
S.No DataGrid GridView
1
Sorting: In DataGrid code requires to handle the SortCommand event and rebind grid required.
Sorting: In case of GridView no additional code required.

2 Paging: In DataGrid requires code to handle the PageIndexChanged event and rebind grid required.
Paging: In case of GridView no additional code required. It also supports customized appearance.


3 Data binding: Like GridView DataGrid cannot bind with new datasource control in ASP.NET 2.0. Data binding: GridView can bind with new datasource control
4 Updating data: DataGrid requires extensive code to update operation on data
Updating data: GridView requires little code. Code like exceptions handling for database part.


5
Events: In DataGrid less events supported as compared to GridView.


Events: GridView supports events fired before and after database updates.


2.Difference between ListView and GridView

S.No ListView GridView
1
Data Grouping: In-built support for this functionality is provided.
Data Grouping: To provide this functionality, we need to write custom code.
2 Provide Flexible Layout: In-built support for this functionality is provided.
Provide Flexible Layout: To provide this functionality, we need to write custom code


3 Insert: In-built support for this functionality is provided. Insert: To provide this functionality, we need to write custom code

3.Difference between DataList and GridView

S.No DataList GridView
1
Paging: To provide this functionality, we need to write custom code.
Paging: In-built support for this functionality is provided.
2 Provide Flexible Layout: In-built support for this functionality is provided.
Provide Flexible Layout: To provide this functionality, we need to write custom code


3 Update,Delete: To provide this functionality, we need to write custom code Update,Delete: In-built support for this functionality is provided.
4
Data Grouping: In-built support for this functionality is provided.
Data Grouping: To provide this functionality, we need to write custom code.
5 Sorting:To provide this functionality, we need to write custom code. Sorting:In-built support for this functionality is provided.

4.Difference between Repeater and ListView


S.No Repeater ListView
1
Paging: To provide this functionality, we need to write custom code.
Paging: In-built support for this functionality is provided.
2
Data Grouping: To provide this functionality, we need to write custom code.
Data Grouping: In-built support for this functionality is provided.
3 Insert: To provide this functionality, we need to write custom code Insert: In-built support for this functionality is provided.
4 Update,Delete: To provide this functionality, we need to write custom code Update,Delete: In-built support for this functionality is provided.
5 Sorting:To provide this functionality, we need to write custom code. Sorting:In-built support for this functionality is provided.

5.Difference between Repeater and DataList


S.No Repeater DataList
1
Repeater is template driven
DataList is rendered as Table.

2
Repeater cannot automatically generates columns from the data source
DataList can automatically generates columns from the data source
3 Row selection is not supported by Repeater Row selection is supported by DataList
4 Editing of contents is not supported by Repeater Editing of contents is supported by DataList
5
Arranging data items horizontally or vertically is not supported by Repeater
We can arrange data items horizontally or vertically in DataList

No comments:

Post a Comment