Edit this page

Dynamic Hyperlink Column

GridViewDynamicHyperlinkColumn derives from GridViewBoundColumnBase class. Except the binding to the desired property of your business object it allows you to easily specify an URL for the hyperlink that hosts the content.

Here is a list of the most important properties:

  • DataMemberBinding - you can specify the property of the business object to be displayed as value in the cell. It is automatically displayed as a link.

  • NavigateUrlMemberPaths - you can specify comma separated field names.

  • NavigateUrlFormatString - allows you to provide a format string for the value of the URL. That way you can easily format URLs provided as relative by the business object.

To learn more about formatting you can check Data Formatting topic.

  • TargetName - specifies the location to open the link.

Example 1: Define GridViewDynamicHyperlinkColumn in XAML.

<telerik:RadGridView x:Name="radGridView"
                 AutoGenerateColumns="False">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding Name}"
                         NavigateUrlMemberPaths="TeamUrl"
                         NavigateUrlFormatString="{} http://oficialleaguesite.com/{0}"&#13;                         TargetName="_blank" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

You can also directly configure the navigate url to be a complete TeamUrl specifying an empty format:

Example 2: Define navigate url without additional format.

<telerik:GridViewDynamicHyperlinkColumn 
 DataMemberBinding="{Binding Name}"
 NavigateUrlMemberPaths="TeamUrl"
 NavigateUrlFormatString="{} {0}"
 TargetName="_blank" />

Figure 1: Look of GridViewDynamicHyperlinkColumn represented in RadGridView

See also