Skip to content

DevExpress-Examples/wpf-data-grid-display-hyperlinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Grid for WPF - How to Display Hyperlinks in Cells

This example demonstrates how to display hyperlinks in GridControl cells. To do that, bind a column to the field that contains a hyperlink in the data source. Define a DataTemplate and assign it to the CellTemplate property. The template should include the HyperlinkEdit editor. Use the HyperlinkEdit.Text property to specify a custom caption instead of a URL.

<dxg:GridColumn FieldName="HelpLink">
    <dxg:GridColumn.CellTemplate>
        <DataTemplate>
            <dxe:HyperlinkEdit Name="PART_Editor"
                               AllowAutoNavigate="True"
                               Text="{Binding RowData.Row.Name}"/>
        </DataTemplate>
    </dxg:GridColumn.CellTemplate>
</dxg:GridColumn>

Files to Look At

Documentation