Start Onrowupdating vb gridview

Onrowupdating vb gridview

Once we have a reference to the Text Box, we set the new last name and save the changes (through the Submit Changes method).

In that case a Text Box is created and added to the Controls collection for the appropriate cell (and it's the only item added to the Controls collection, so it's Controls[0]).

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.

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.