Protected void gridview rowupdating object sender gridviewupdateeventargs e
Title ID is retrieved from Grid View selected or editing row and passed to Bind Details View to populate Details View with editing data.Item Updating event fires when Update button of Details View in Edit Mode is clicked. After that mode of Details View is changed from Details View Mode. But ensure that the control/link is inside the Grid View, only then can we cast sender as Grid View.This code is a bit complex but just add it knowing that we may refer to it in the future.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.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.
As a beginner it's very tough and challenging to work with controls like a Grid View in ASP. Even I faced difficulties at the starting point of my career. Here, I am not going to explain about Grid View and other events in it, because there are a lot of good articles about that.We set Page Index property of the Grid View to this new page number and call the Bind Grid() method again.