| |||||||
HyperLinkColumn.DataTextField PropertySystem.Web.UI.WebControls Namespace HyperLinkColumn Class Sets or retrieves the field from a data source to bind to the text caption of the hyperlinks in the column. Syntax
Property Value
The property is read/write with no default value. RemarksUse the DataTextField property to specify the field name from a data source to bind to the text caption of the hyperlinks in the column. When the text caption is data bound to a field, the text caption of each hyperlink in the column is set with a corresponding value in the specified field. This allows you to set a different text caption for each hyperlink in the column. To specify the same text caption for each row in the column, set the Text property instead of this property.
When using data binding, you can specify a custom display format for the text caption of the hyperlinks by setting the DataTextFormatString property. ExampleThe following example demonstrates how to use the DataTextField property to specify the field in the data source to bind to the text caption of the hyperlinks in the column. <asp:hyperlinkcolumn headertext = "Title"
datatextfield = "title"
datanavigateurlformatstring = "details_title.aspx?titleid={0}"
datanavigateurlfield = "title_id" />
See AlsoHyperLinkColumn Members Adding HyperLink Columns to a DataGrid Control |
| ||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme