Gridview rowupdating newvalues count 0
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.
We’ll revisit this method when we implement the sorting functionality.
We also want it to be something persistent, so that, for example, if you sort, then page, the sort is maintained.
The way we’ll accomplish this is to create two properties that store those values in View State.
We’ll get to how these properties are populated shortly, but first we need to go back to the Bind Data method.
The original method shown above did not implement any sorting, but now that we have a place to store the Sort Expression and Sort Direction we need to change that.
NET forums is how to deal with exceptions like The Grid View 'Grid View1' fired event Row Editing which wasn't handled.