We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Override GridHyperlinkColumn style

Hi,

I'm currently using Syncfusion Datagrid control on a project, and i just implemented one HyperlinkColumn to use for navigation.Unfortunately, the default style of Hyperlink text is not the same as the ones used in the whole app.
Could you please tell me how to override that default style, and use another one?

Thanks a lot, Regards,

Stéphane

1 Reply

JG Jai Ganesh S Syncfusion Team February 20, 2014 10:11 AM UTC

Hi Stéphane,

 

Thank you for using Syncfusion products.

 

We have analyzed your query. You can override the default style for HyperLinkColumn by writing the style for “HyperLinkButton”. Please find the following code snippet which illustrate this,

 

Code Snippet [XAML]:

 

<syncfusion:SfDataGrid x:Name="datagrid"

                        AutoGenerateColumns="False"

                        ColumnSizer="Star"

                        ItemsSource="{Binding GDCSource}">

 

    <syncfusion:SfDataGrid.Resources>

        <Style TargetType="HyperlinkButton">

            <Setter Property="Foreground" Value="Blue" />

        </Style>

    </syncfusion:SfDataGrid.Resources>

 

    <syncfusion:SfDataGrid.Columns>

        <syncfusion:GridTextColumn MappingName="EmployeeId" />

        <syncfusion:GridTextColumn MappingName="EmployeeName" />

        <syncfusion:GridTextColumn MappingName="EmployeeArea" />

        <syncfusion:GridTextColumn MappingName="EmployeeGender" />

        <syncfusion:GridHyperlinkColumn MappingName="EmployeeEmail" />

    </syncfusion:SfDataGrid.Columns>

 

</syncfusion:SfDataGrid>

 

 

Please let us know if you need further assistance.

 

Thank you,

Jai Ganesh S


Loader.
Live Chat Icon For mobile
Up arrow icon