Possible Duplicate:
The Difference Between a DataGrid and a GridView in ASP.NET?
What is main difference between Data grid and Grid View in asp.net?
The DataGridView control provides numerous basic and advanced features that are missing in the DataGrid control. Additionally, the architecture of the DataGridView control makes it much easier to extend and customize than the DataGrid control.
Because the DataGridView control has an entirely new architecture, there is no straightforward conversion path that will enable you to use DataGrid customizations with the DataGridView control. Many DataGrid customizations are unnecessary with the DataGridView control, however, because of the built-in features available in the new control.
The GridView control enables you to add sorting, paging, and editing capabilities without writing any code. Instead, you can automate these tasks, along with other common tasks such as data binding to a data source, by setting properties on the control. Show activity on this post.
The only feature that is available in the DataGrid control that is not available in the DataGridView control is the hierarchical display of information from two related tables in a single control. You must use two DataGridView controls to display information from two tables that are in a master/detail relationship.
DataGrid has been around since .NET 1.1 while GridView was introduced in .NET 2.0. So basically GridView
is the successor of DataGrid
. Here's a nice article on MSDN comparing both.
Both the DataGrid and GridView controls are derived from the WebControl class. Although it has a similar object model to that of the DataGrid control, the GridView control also has a number of new features and advantages over the DataGrid control, which include: Richer design-time capabilities. Improved data source binding capabilities. Automatic handling of sorting, paging, updates, and deletes. Additional column types and design-time column operations. A Customized pager user interface (UI) with the PagerTemplate property. Differences between the GridView control and the DataGrid control include: Different custom-paging support. Different event models.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With