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



    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">
                    <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" />

    ..any help would be appreciated.




  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:GridViewDataColumn DataMemberBinding="{Binding Name}" HeaderCellStyle="{StaticResource MyCellStyle}" Header="{x:Static Title}" Width="200" />


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

  3. Dilyan Traykov
    Dilyan Traykov avatar
    603 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.

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