Difference between GridView and DataGrid in Asp.net

GridView and DataGrid Data-bound controls are used to display and modify data in your Asp.net web application.

GridView:-

  1. It was introduced with Asp.Net 2.0.
  2. Built-in supports for Paging and Sorting.
  3. Built-in supports for Update and Delete operations.
  4. Supports auto format or style features.
  5. Performance is slow as compared to DataGrid.  

DataGrid:-

  1. It was introduced with Asp.Net 1.0
  2. 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.
  3. Need to write code for implementing Update and Delete operations.
  4. Not Supports auto format or style features.
  5. Performance is fast as compared to GridView.

No comments:

Post a Comment