System.Web.UI.WebControls.CommandField.ShowSelectButton Property

Gets or sets a value indicating whether a Select button is displayed in a System.Web.UI.WebControls.CommandField field.

Syntax

[System.ComponentModel.DefaultValue(false)]
public virtual bool ShowSelectButton { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the CommandField.ShowSelectButton property to specify whether a Select button is displayed in a System.Web.UI.WebControls.CommandField field for each record in the data-source control. The Select button allows the user to select a row in the data-source control. When the Select button for a record is clicked, the data-source control responds accordingly. For example, a System.Web.UI.WebControls.GridView control updates the GridView.SelectedDataKey, GridView.SelectedIndex, GridView.SelectedRow, and GridView.SelectedValue properties to values corresponding to the selected row. The GridView.SelectedRowStyle style is then applied to the selected row and the GridView.SelectedIndexChanged and GridView.SelectedIndexChanging events are raised.

When the ButtonFieldBase.ButtonType property of a System.Web.UI.WebControls.CommandField field is set to ButtonType.Button or ButtonType.Link, use the CommandField.SelectText property to specify the text to display for a Select button. Alternatively, you can display an image by first setting the ButtonFieldBase.ButtonType property to ButtonType.Image and then setting the CommandField.SelectImageUrl property.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0