This documentation is archived and is not being maintained.
ButtonColumn.DataTextField Property
.NET Framework 1.1
Gets or sets the field name from a data source to bind to the ButtonColumn.
[Visual Basic] Public Overridable Property DataTextField As String [C#] public virtual string DataTextField {get; set;} [C++] public: __property virtual String* get_DataTextField(); public: __property virtual void set_DataTextField(String*); [JScript] public function get DataTextField() : String; public function set DataTextField(String);
Property Value
The field name to bind to the ButtonColumn. The default value is String.Empty.
Remarks
Use the DataTextField property to specify the field name from the data source to bind to the Text property of the buttons in the ButtonColumn.
Binding the column to a field instead of setting the Text property directly allows you to display different captions for the command buttons in the column by using the values in the specified field.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
ButtonColumn Class | ButtonColumn Members | System.Web.UI.WebControls Namespace | Text
Show: