5 Answers, 1 is accepted
Both GridViewHyperlinkColumn/GridViewDynamicHyperlinkColumn use a plain HyperlinkButton. If you define a simple style targeted at HyperlinkButton it will be handled correspondingly by these columns:
<Style TargetType="HyperlinkButton"> <Setter Property="Foreground" Value="Red"/>...</Style>Hope this helps!
Kind regards,
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I have pasted the Silverlight version of the style by mistake, sorry for that! In WPF you may create a style targeted at a Hyperlink instead of HyperlinkButton:
<Style TargetType="{x:Type Hyperlink}"> <Setter Property="Foreground" Value="Red"/> </Style> </Window.Resources> <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}"> <telerik:RadGridView VerticalAlignment="Top" ItemsSource="{Binding Collection}"> <telerik:RadGridView.Columns> <telerik:GridViewHyperlinkColumn DataMemberBinding="{Binding Property1}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid>Best wishes,
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
<Style TargetType="{x:Type Hyperlink}"> <Setter Property="Foreground" Value="Red"/> </Style> </Window.Resources> <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}"> <telerik:RadGridView VerticalAlignment="Top" ItemsSource="{Binding Collection}"> <telerik:RadGridView.Columns> <telerik:GridViewHyperlinkColumn DataMemberBinding="{Binding Property1}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid>Can you send some code that functions properly? Thanks
Strasz
Yes, the style resides within the Window's ResourceCollection.
I am attaching you sample application illustrating this approach.
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>