The Cancel property allows you to cancel the sorting operation.

The Grid View Sort Event Args class has three important properties.

The Sort Expression property supplies the sort expression that you specified earlier for the column being sorted.

The Sorting event allows you to cancel the operation also.

The Sorting event handler receives an event argument of type Grid View Sort Event Args.

The method essentially binds the Grid View with a Data View.

The Data View supplies all the records from the Employees table.

The following figure shows the Grid View after implementing paging. First of all, you need to set Allow Sorting property of the Grid View to True.

Further, you need to set Sort Expression property of the Bound Fields to the name of the column on which you would like to sort the grid.

Fortunately Grid View can also be used without attaching with the Data Source Controls. In this article we will see how paging, sorting and editing can be implemented in a Grid View control that is bound with a Data View (or Data Table) directly.

This calls for some extra coding from developer's end. As an example we are going to use Employees table of the Northwind database. Add three Bound Fields and a Command Field to the Grid View with the help of Fields dialog (see below).

Introduction Websites often display thousands of data in a Grid View in ASP. Usually admin can view the registered users on the website, but when an admin wants to edit or delete any fraud or duplicate or damaged data from the table there is a method in Grid View to edit, delete and update. Source Code Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.