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

Vertical Column Headers with filter row

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Myroslav
Top achievements
Rank 1
Myroslav asked on 07 Mar 2014, 08:39 PM
We are using Telerik WPF controls (2013 Q3 NET) in our desktop application.

There is a requirement for a vertically aligned text in the column headers and also a filter row. (I have attached the picture to this post)

I have tried the following code:

 <telerik:RadGridView x:Name="trgv"                             
                             FilteringMode="FilterRow"                             
                             IsFilteringAllowed="True">

            <telerik:RadGridView.Resources>
                <Style TargetType="telerik:GridViewHeaderCell">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="telerik:GridViewHeaderCell">
                                <ContentPresenter>
                                    <ContentPresenter.LayoutTransform>
                                        <RotateTransform Angle="270" />
                                    </ContentPresenter.LayoutTransform>
                                </ContentPresenter>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

            </telerik:RadGridView.Resources>
</telerik:RadGridView>

but when the grid is displayed, the header text spans both header and filter row, and filters do not show up at all.

Can someone help with this issue?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 11 Mar 2014, 10:57 AM
Hello Myroslav,

This is the expected behavior, since the FilterRow is part of GridViewHeaderCell. So, you can try to define the header of your column like so:
          .
          .
<telerik:RadGridView.Columns>
   <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
      <telerik:GridViewDataColumn.Header>
      <Grid>
       <Grid.LayoutTransform>
            <RotateTransform Angle="270"/>
       </Grid.LayoutTransform>
       <TextBlock Text="My Vertical Header"/>
      </Grid>
       </telerik:GridViewDataColumn.Header>
   </telerik:GridViewDataColumn>
           .
           .


Regards,
Yoan
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
GridView
Asked by
Myroslav
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or