Figure 6. Enhance Data Editing With Template Fields.
The Fields dialog has a Convert This Field into a TemplateField link that replaces the GridView's default bound labels and textboxes with Item, AlternatingItem, and EditItem templates. DetailsView and FormView controls also receive an InsertItem template. The most common EditItem and InsertItem textbox replacement is a DropDownList for setting foreign key values. The Choose a Data Source dialog lets you select the SqlDataSource, display field, and value field for the DropDownList. The ControlName DataBindings dialog lets you specify the bound column, an optional format string, and one-way (default) or two-way databindings.