The ASP.NET 2.0 framework introduces new control for working with database data. In ASP.NET 1.0, we are normally using DataGrid, Repeater, and DataList. With this control, you could display an entire collection of data, easily add sorting and paging and perform inline editing. Although this new functionality was great, however developer still need to write a significant amount of code to properly displaying their data in DataGrid.Now in ASP.NET 2.0, Microsoft has introduced new control which is called GridView. The GridView control is the successor to the DataGrid control. While Microsoft ASP.NET 2.0 still includes the DataGrid control, you are encouraged to take advantage of the new features of the GridView control. The GridView control enables you to perform many of the same tasks as you would previously perform with the DataGrid control. The advantage of the GridView control is that, in many cases, you can perform these tasks without writing any code. The GridView control enables you to: 1. Display a set of database records. 2. Sort a set of database records. 3. Page through a set of database records. 4. Edit a set of database records. In addition, unlike the DataGrid control, the GridView control enables you to sort and page through database records without requiring a postback to the server. The GridView control, optionally, uses client-side script to enable you to sort and page database records without performing a form post.
Start Using the GridView Control by dragging the control onto the designer surface of an ASP.NET Web Page.
Click here to view Author Profile