Vertical Column Headers with filter row

2 posts, 0 answers
  1. Myroslav
    Myroslav avatar
    3 posts
    Member since:
    Mar 2014

    Posted 07 Mar 2014 Link to this post

    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.
  2. Yoan
    Admin
    Yoan avatar
    1215 posts

    Posted 11 Mar 2014 Link to this post

    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.

Back to Top