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

FrozenColumn style

1 Answer 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dirk Liebich
Top achievements
Rank 1
Dirk Liebich asked on 22 Aug 2011, 04:51 PM
Dear everybody,

is it possible to re-style the border of a column once it is frozen? I'd like to get rid of the shadow then.

Can somebody explain how to do this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Aug 2011, 05:47 PM
Hi Dirk Liebich,

 You may achieve the desired result by predefing the template of FrozenColumnSplitter.
The snippet below demonstrates how this can be done:

<UserControl.Resources>
        <ControlTemplate x:Key="FrozenColumnsSplitterTemplate" TargetType="telerik:FrozenColumnsSplitter">
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,0,0,0" Width="4">
                <Border BorderThickness="0,0,2,0" Background="{TemplateBinding Background}" Margin="0"/>
            </Border>
        </ControlTemplate>
        <SolidColorBrush x:Key="GridView_FrozenColumnBackground" Color="LightBlue"/>
        <SolidColorBrush x:Key="GridView_FrozenColumnBorder" Color="White"/>
        <Style  TargetType="telerik:FrozenColumnsSplitter">
            <Setter Property="Template" Value="{StaticResource FrozenColumnsSplitterTemplate}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Background" Value="{StaticResource GridView_FrozenColumnBackground}"/>
            <Setter Property="BorderBrush" Value="{StaticResource GridView_FrozenColumnBorder}"/>
        </Style>
    </UserControl.Resources>
  
    <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
        <telerik:RadGridView ItemsSource="{Binding Collection}"/>
      
    </Grid>

I hope that this is helpful. Please let me know in case you have any further questions on this topic.

Best wishes,
Didie
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Dirk Liebich
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or