views:

145

answers:

4

MSDN says, The DataGridView control is a new control that replaces the DataGrid control in .NET Framework 3.5.

In any project in VS2008, there is no datagrid control listed in the tool box and only gridview control is present. The MSDN page also describes all the features that gridview provides and datagrid doesnt - Can anyone tell me if Datagrid control is obsolete or excluded?

If so, is there any difference in performance in using these two controls? I personally generally use gridview control always. Is there any condition where using datagrid is better than using gridview? or vice versa.

+2  A: 

DataGridView is for Windows forms.

As you have mentioned asp.net in tags, probably you have web application. For web application there is GridView control.

Saar
I think you nailed the source of the confusion.
Greg
A: 

In ASP.NET the GridView has replaced the DataGrid control. I don't know of any scenario in which you would want to use a DataGrid instead of a GridView, except in older applications.

Jamie Ide
+1  A: 

DataGridView is newer than DataGrid.

Please check out this site for more info http://www.wwwcoder.com/parentid/459/tabid/68/type/art/site/6454/default.aspx

madatanic
+1  A: 

There is backwards compatibility to support the DataGrid object as I recall, but the GridView control (for ASP.Net) and the DataGridView control (for WinForms) are the preferred grid mechanisms. You'll find a better binding scheme, more extensibility in the template display, and a richer interface for modifying individual cells/rows/columns.

http://msdn.microsoft.com/en-us/magazine/cc163933.aspx

Joel Etherton