NET forums is how to deal with exceptions like The Grid View 'Grid View1' fired event Row Editing which wasn't handled.The Grid View 'Grid View1' fired event Page Index Changing which wasn't handled.The important point is not which of these two events call Bind Data, but one of them must or the Grid View will not be updated. When bound using a Data Source ID, the Grid View internally tracks the current Sort Expression and Sort Direction, and those are available through properties with the same names.When you manually bind the Grid View, this tracking does not occur, so we must implement some mechanism for tracking those values.
The way we’ll accomplish this is to create two properties that store those values in View State.
The Grid View does know the events that should be used to implement them, so the exceptions shown above are thrown when you try to perform one of these operations, but you have implemented the appropriate event handler.
The example shown here is for a Grid View, but the same types of event handlers must be implemented in roughly the same way for other data controls including the Form View, Details View, and List View. This is the final Grid View markup, so you can see the event handlers we’re going to implement.
In addition to that, we’re resetting the Edit Index and Selected Index when the page is changed to avoid cases, for example, where you change pages and are suddenly editing a different item.
Bind Data could be called in Page Index Changing, but to show that it the event is raised, we’ve handled that in Page Index Changed.