Changing background of RadTreeListView header ?

3 posts, 0 answers
  1. Barry
    Barry avatar
    31 posts
    Member since:
    May 2016

    Posted 06 Jun 2016 Link to this post

    Hi,

     

    I'm trying to change the HEADER background but my only success left the control inoperable - the sorting and filtering did not work.

    I need the *HEADER ROW* background to be this gradient:

            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF25578A" Offset="0" />
                        <GradientStop Color="#FF25578A" Offset="1" />
                        <GradientStop Color="#FF25579A" Offset="0.42" />
                        <GradientStop Color="#FF003F87" Offset="0.43" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>

    ..any help would be appreciated.

    Barry

     

     

  2. Barry
    Barry avatar
    31 posts
    Member since:
    May 2016

    Posted 06 Jun 2016 in reply to Barry Link to this post

    Seems the answer was:

    ...

                    <telerik:RadTreeListView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" HeaderCellStyle="{StaticResource MyCellStyle}" Header="{x:Static Title}" Width="200" />
                    </telerik:RadTreeListView.Columns>
                </telerik:RadTreeListView>

     

    ..and then tinker with the Style as extracted from Blend for the same control.

  3. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    413 posts

    Posted 09 Jun 2016 Link to this post

    Hello Barry,

    As you've correctly guessed, to customize the appearance of the RadGridView's header cells you should define an appropriate style targeting the GridViewHeaderCell element and set it as the HeaderCellStyle for the respective columns. If you want to set the same style for all your columns, you may want to make the style implicit.

    Additionally, you can style the entire header row, by styling the GridViewHeaderRow element. RadGridView exposes a HeaderRowStyle property which you can use for this purpose.

    I hope you find this information helpful.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top