Introducing ASP.NET 2.0: GridView Control - Adding Paging Functionality to GridView
(Page 4 of 5 )
First, you must set the AllowPaging property to True. By default, the GridView shows only one record at a time. You can modify this by changing the PageSize property to a specific value such as 2, 3 depending upon the number of records on the database. The GridView will look similar to Figure 9.

Figure 9
Adding Sorting Functionality to GridView
In order to sort the data you just need to set the AllowSorting property to true. The title of each column changes to a hyperlink as given in Figure 10.

Figure 10
Run the project and click on the link of any column to see sorting in action.
Next: Updating Data >>
More ASP.NET Articles
More By Anand Narayanaswamy