ButtonFieldBase Class
TOC
Collapse the table of content
Expand the table of content

ButtonFieldBase Class

 

Serves as the abstract base class for button fields, such as the ButtonField or CommandField class. The ButtonFieldBase class provides the methods and properties that are common to all button fields.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)


Public MustInherit Class ButtonFieldBase
	Inherits DataControlField

NameDescription
System_CAPS_protmethodButtonFieldBase()

Initializes a new instance of the ButtonFieldBase class.

NameDescription
System_CAPS_pubpropertyAccessibleHeaderText

Gets or sets text that is rendered as the AbbreviatedText property value in some controls.(Inherited from DataControlField.)

System_CAPS_pubpropertyButtonType

Gets or sets the button type to display in the button field.

System_CAPS_pubpropertyCausesValidation

Gets or sets a value indicating whether validation is performed when a button in a ButtonFieldBase object is clicked.

System_CAPS_protpropertyControl

Gets a reference to the data control that the DataControlField object is associated with.(Inherited from DataControlField.)

System_CAPS_pubpropertyControlStyle

Gets the style of any Web server controls contained by the DataControlField object.(Inherited from DataControlField.)

System_CAPS_protpropertyDesignMode

Gets a value indicating whether a data control field is currently viewed in a design-time environment.(Inherited from DataControlField.)

System_CAPS_pubpropertyFooterStyle

Gets or sets the style of the footer of the data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyFooterText

Gets or sets the text that is displayed in the footer item of a data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyHeaderImageUrl

Gets or sets the URL of an image that is displayed in the header item of a data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyHeaderStyle

Gets or sets the style of the header of the data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyHeaderText

Gets or sets the text that is displayed in the header item of a data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyInsertVisible

Gets a value indicating whether the DataControlField object is visible when its parent data-bound control is in insert mode.(Inherited from DataControlField.)

System_CAPS_protpropertyIsTrackingViewState

Gets a value indicating whether the DataControlField object is saving changes to its view state.(Inherited from DataControlField.)

System_CAPS_pubpropertyItemStyle

Gets the style of any text-based content displayed by a data control field.(Inherited from DataControlField.)

System_CAPS_pubpropertyShowHeader

Gets or sets a value indicating whether the header section is displayed in a ButtonFieldBase object.(Overrides DataControlField.ShowHeader.)

System_CAPS_pubpropertySortExpression

Gets or sets a sort expression that is used by a data source control to sort data.(Inherited from DataControlField.)

System_CAPS_protpropertyValidateRequestMode

Gets or sets a value that specifies whether the control validates client input.(Inherited from DataControlField.)

System_CAPS_pubpropertyValidationGroup

Gets or sets the name of the group of validation controls to validate when a button in a ButtonFieldBase object is clicked.

System_CAPS_protpropertyViewState

Gets a dictionary of state information that allows you to save and restore the view state of a DataControlField object across multiple requests for the same page.(Inherited from DataControlField.)

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether a data control field is rendered.(Inherited from DataControlField.)

NameDescription
System_CAPS_protmethodCloneField()

This API supports the product infrastructure and is not intended to be used directly from your code. Creates a duplicate copy of the current DataControlField-derived object.(Inherited from DataControlField.)

System_CAPS_protmethodCopyProperties(DataControlField)

Copies the properties of the current object that is derived from the ButtonFieldBase class to the specified DataControlField object.(Overrides DataControlField.CopyProperties(DataControlField).)

System_CAPS_protmethodCreateField()

When overridden in a derived class, creates an empty DataControlField-derived object.(Inherited from DataControlField.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodExtractValuesFromCell(IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean)

Extracts the value of the data control field from the current table cell and adds the value to the specified IDictionary collection.(Inherited from DataControlField.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitialize(Boolean, Control)

Performs basic instance initialization for a data control field.(Inherited from DataControlField.)

System_CAPS_pubmethodInitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32)

Adds text or controls to a cell's controls collection.(Inherited from DataControlField.)

System_CAPS_protmethodLoadViewState(Object)

Restores the data source view's previously saved view state.(Inherited from DataControlField.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnFieldChanged()

Raises the FieldChanged event.(Inherited from DataControlField.)

System_CAPS_protmethodSaveViewState()

Saves the changes made to the DataControlField view state since the time the page was posted back to the server.(Inherited from DataControlField.)

System_CAPS_pubmethodToString()

Returns a string that represents this DataControlField object.(Inherited from DataControlField.)

System_CAPS_protmethodTrackViewState()

Causes the DataControlField object to track changes to its view state so they can be stored in the control's ViewState property and persisted across requests for the same page.(Inherited from DataControlField.)

System_CAPS_pubmethodValidateSupportsCallback()

When overridden in a derived class, signals that the controls contained by a field support callbacks.(Inherited from DataControlField.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.LoadViewState(Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Restores the data control field's previously saved view state.(Inherited from DataControlField.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.SaveViewState()

This API supports the product infrastructure and is not intended to be used directly from your code. Saves the changes made to the DataControlField view state since the time the page was posted back to the server.(Inherited from DataControlField.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.TrackViewState()

This API supports the product infrastructure and is not intended to be used directly from your code. Causes the DataControlField object to track changes to its view state so they can be stored in the control's ViewState property and persisted across requests for the same page.(Inherited from DataControlField.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDataSourceViewSchemaAccessor.DataSourceViewSchema

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the schema associated with this DataControlField object.(Inherited from DataControlField.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIStateManager.IsTrackingViewState

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a value indicating whether the DataControlField object is saving changes to its view state.(Inherited from DataControlField.)

The ButtonFieldBase class is the abstract base class for button fields and contains the methods and properties that are common to all button fields. Because this class is abstract, you cannot create an instance of it directly. Instead, you must create an instance of a non-abstract class that inherits from the ButtonFieldBase class, such as the ButtonField or CommandField class.

An object that is derived from the ButtonFieldBase is used by data-bound controls (such as the GridView and DetailsView controls) to display one or more buttons for each record that is displayed. A button field is displayed differently depending on the data-bound control in which it is used. For example, the GridView control displays a button field as a column, whereas the DetailsView control displays it as a row.

Clicking a button in a button field raises the command event of the parent data-bound control. You can provide a custom routine to perform when a button is clicked by providing an event handler for the command event.

System_CAPS_noteNote

The GridView control raises the RowCommand event, whereas the DetailsView control raises the ItemCommand event.

To specify the type of button to display, use the ButtonType property. To show or hide the header section of a ButtonFieldBase object, set the ShowHeader property.

System_CAPS_noteNote

Some data-bound controls (such as the GridView control) can show or hide only the entire header section of the control. These data-bound controls do not support the ShowHeader property for an individual button field. To show or hide the entire header section of a data-bound control (if available), use the ShowHeader property for the control.

Notes to Inheritors:

When you inherit from the ButtonFieldBase class, you must override the following member: CopyProperties.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft