Link for csharp, asp.net, ado.net, dotnet basics and sql server video tutorial playlists
In this video, we will discuss about
1. The difference between datagrid and gridview controls
2. What to choose datagrid or gridview
Difference between DataGrid and GridView
1. DataGrid is introduced in asp.net 1.1 and is still supported today. GridView is introduced in asp.net 2.0.
2. Declarative datasource controls can be used with DataGrid only for data selection. Tasks like paging, sorting, deletes and updates must be done in code. The GridView control can achieve all of these using the declarative datasource controls.
3. GridView introduces new column types.
What to choose datagrid or gridview
If you are using asp.net 2.0 or later, I personally suggest using gridview over datagrid control.
DataGrid control is not found in visual toolbox?
If you are using visual studio 2008 or later versions, by default DataGrid control is not shown in the visual studio toolbox. If you want the datagrid control, to appear in visual studio toolbox, follow these steps
1. Right click on toolbox, and select “Choose Items”
2. From “Choose Toolbox Items” dialog box, select “DataGrid” that is present in “System.Web” assembly.
3. Finally click OK. You should now see “DataGrid” control in visual studio toolbox.