Rowupdating code for gridview
The Page Index Changing event handler receives an event argument of type Grid View Page Event Args.
This argument provides the new page number that the user has selected via a property called New Page Index.
However, when coupled with data source controls the Grid View can toggle the sorting direction automatically for you and you can get/set the direction using this property.
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.
Once you set these properties you will find that the column headers of all the columns for which you specified Sort Expression property appear as clickable link buttons.
Clicking on the link buttons raise two events: Just like paging events these events follow pre and post pattern.
Net while am trying to update the row it was not getting updated. Find Control("txt Name3"), Text Box) 'doupdate(txt Name1, txt Name2, txtname3, txt Name) 'con.