GridView, DataGrid and ListView Data-bound controls are used to display and modify data in your Asp.Net web application. These controls also contains others Asp.Net controls like as Label, TextBox, DropdownList etc. into a single layout. In this article, I am going to expose the difference among these three.
Difference between GridView and DataGrid
GridView
DataGrid
table
It was introduced with Asp.Net 2.0.
It was introduced with Asp.Net 1.0.
Built-in supports for Paging and Sorting.
For sorting you need to handle SortCommand
event and rebind grid required and for paging
you need to handle the PageIndexChanged
event and rebind grid required.
event and rebind grid required and for paging
you need to handle the PageIndexChanged
event and rebind grid required.
Built-in supports for Update and Delete operations.
Need to write code for implementing
Update and Delete operations.
Update and Delete operations.
Supports auto format or style features.
This features is not supported.
ListView
GridView
It was introduced with Asp.Net 3.5.
It was introduced with Asp.Net 2.0.
Template driven.
Rendered as Table.
Built-in supports for Data grouping.
Need to write custom code.
Built-in supports for Insert operation.
Need to write custom code.
Provides flexible layout to your data.
Need to write custom code.
Performance is fast is compared to GridView.
Performance is slow as compared to ListView.
No comments:
Post a Comment