Once we have a reference to the Text Box, we set the new first name.
For the Template Field, we do know the ID of the control since we specified it in the markup, so we obtain a reference to it by calling Find Control on the appropriate row of the Grid View.
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.
By default, the Grid View control doesn’t have support for inserting new records.
However you can use the built-in edit or delete functionality of the Grid View control.
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.
We’ll start with binding data to the Grid View, then build up functionality from there.