Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datagrid vs Gridview [duplicate]

Tags:

c#

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?

like image 741
saran Avatar asked Jan 19 '11 10:01

saran


People also ask

What is the difference between DataGrid and datagridview?

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.

Can I use DataGrid customizations with the datagridview 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.

What is the GridView 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.

Which features are not available in the DataGrid control?

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.


1 Answers

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.

like image 149
Darin Dimitrov Avatar answered Oct 07 '22 01:10

Darin Dimitrov