This documentation is archived and is not being maintained.

ButtonColumn.Text Property

Gets or sets the caption displayed in the command buttons of the ButtonColumn.

[Visual Basic]
Public Overridable Property Text As String
[C#]
public virtual string Text {get; set;}
[C++]
public: __property virtual String* get_Text();
public: __property virtual void set_Text(String*);
[JScript]
public function get Text() : String;
public function set Text(String);

Property Value

The caption displayed in the command buttons of the ButtonColumn. The default value is String.Empty.

Remarks

Use the Text property to specify or determine the caption displayed in the command buttons of the ButtonColumn.

Note   If you set the Text property, all command buttons in the column share the same caption.

Alternatively, you can bind the ButtonColumn to a field in a data source. This allows you to display different captions for the command buttons in the column using the values in the specified field. Set the DataTextField property to bind the column to a field in a data source.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ButtonColumn Class | ButtonColumn Members | System.Web.UI.WebControls Namespace | DataTextField | String.Empty

Show: