Saturday, July 3, 2010

Difference between datagrid and gridview

Difference between GridView and DataGrid ?
DataGrid GridView
Sorting, and in-Place editing of data requires additional coding. It enables you to add Sorting, Paging and editing features without writing any code. We can enable these features by setting properties on the control.
The DataGrid control can declaratively bind a DataSourceControl control, it can do so only for data selection. Sorting, paging, updates, and deletions must be written manually. The GridView control supports a DataSourceID property that can be set to any object that implements the IDataSource interface and can, therefore, take advantage of the data source control's sorting, paging, updating, and deleting capabilities, for example, the SqlDataSource control Control.
The DataGrid control requires additional coding for paging. The GridView control automatically supports paging by setting the PagerSettings property.
AllowCustomPaging property must be set to true for custom paging. Custom paging support in the GridView is supplied by the bound data source control
It raises single events for operations such as sorting, updating Gridview raises Pre-Operation and Post-Operation events such as Sorted,Sorting events for Sort command, Updating and Updated events for Update command.

No comments:

Post a Comment