Add New Column, Add Fields Dialog Box
The Add Field dialog box enables you add a new column to a control that supports this dialog box. Examples of controls that support this dialog box are the GridView and DetailsView controls.
To change column properties
In Design view, right-click the control, and then click Show Smart Tag.
The smart tag panel is displayed.
Click Add New Column.
The Add Field dialog box is displayed.
Select the field type, set the field options, and then click OK.
The new column is added to the control.
The options available for each field vary according to the field type.
How to: Add Web Server Controls to a Web Forms Page Using the Web Forms Designer
How to: Set ASP.NET Server Control Style Properties in the Designer
UIElement List
Choose a field type
Specifies the kind of field to add to the control. The options that are displayed depend on the selected field type.Header text
Specifies the text to display as the column heading.
BoundField
Data field
Specifies the field in the data source to bind to.Read only
Specifies the field should be read only.
CheckBoxField
Data field
Specifies the field in the data source to bind to.Read only
Specifies whether the field should be read only.
HyperLinkField
Hyperlink text
Specifies the hyperlink text to display. Select Specify text to specify the text manually. Select Get text from data field to specify the data source field that contains the text to display. If you select Get text from data field, the Text format string box is enabled, and you can enter a format string.Hyperlink URL
Specifies the URL for the hyperlink. Select Specify URL to specify the URL manually. Select Get URL from data field to specify the data source field that contains the URL to display. If you select Get URL from data field, the URL format string box is enabled, and you can enter a format string.
ButtonField
Button type
Specifies the button type (Link or Button).Command name
Specifies the name of the command that the button will execute (Cancel, Delete, Edit, Insert, New, or Update).Text
Specifies the text to display on the button.
CommandField
Button type
Specifies the button type (Link or Button).Command Buttons
Specifies the buttons to display in the field (Delete, Edit/Update, or New/Insert). If you select Edit/Update, you can also select Show cancel button.
ImageField
Data field
Specifies the data source field that contains the image to display.URL format string
Specifies the URL format string for the image.Read only
Specifies whether the field should be read only.
See Also
GridView Web Server Control Overview
Creating a Custom Column in a GridView Web Server Control
Working with ASP.NET Web Server Controls
DetailsView Web Server Control Overview