Rowupdating event of grid view in asp net
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.
The Sort Expression property supplies the sort expression that you specified earlier for the column being sorted.
The Cancel property allows you to cancel the sorting operation.
Since we are not using data source controls we need to handle the toggling of the sort direction on our own. Add the following code in the Sorting event handler.
We need to write our own code to update the new values back to the database in the Row Updating event.
Add the following code in the Row Editing event handler: The Row Editing event handler receives an event argument of type Grid View Edit Event Args.