This is a migrated thread and some comments may be shown as answers.

Hyperlink Column No Hyperlink

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 04 Feb 2009, 07:14 PM
Using 2008 Q3, DOT NET 3.5

I have a couple of problems with the Hyperlink column (I am building the grid in Code Behind)

Setting the displayed text.

DataTextFormatString = "CONST"
DataTextField = Nothing

Result blank cell.

Yes, I can work out that ther eis no DataTextField and set the Text Property instead, but why do I have to.


Setting the URL.

DataNavigateUrlFormatString = "~/xxxxx.aspx"
DataNavigateUrlFields = Empty

Te column does not render as a hyperlink.


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 05 Feb 2009, 08:42 AM
Hello Andrew,

To specify the text of the link, you can do one of the following:

    * Set the Text property to a static value. When you use this method, every link appears the same in the entire column.
    * Set the DataTextField property to a field that supplies the text for the link. When you use this method, you can format the text that comes from the database by setting the DataTextFormatString property.

To specify the target of the hyperlink, set the DataNavigateUrlFields property. You can specify multiple fields if the target of the hyperlink is determined by more than one field in the database. You can then combine the navigate URL fields by specifying a format string as the value of the DataNavigateUrlFormatString property.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or