Clicking on Update link button raises Row Updating event whereas clicking on the Cancel link button raises Row Canceling Edit event.We need to write our own code to update the new values back to the database in the Row Updating event.The Sorting event handler receives an event argument of type Grid View Sort Event Args.
In order to develop a test web form create a new web site in VS. Set various properties of the Bound Fields as shown in the following table: Here, we call Bind Grid() method if the web form is being served as a result of first request.
In the Row Updating event handler, it fetches the Category Name data to which the textbox is bound to.
Note: Instead of using Text Box in normal mode use Labels.
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.
The Grid View Edit Event Args class has a property called New Edit Index that tells us the row number being edited.