Mouse Over for Grid columns

3 posts, 0 answers
  1. Vikas
    Vikas avatar
    64 posts
    Member since:
    May 2014

    Posted 12 Jan 2015 Link to this post

    How can i change the mouse over and selected (color after you click on a column)  color for the GridView columns. I am using this to change the default color

    <Style TargetType="{x:Type telerik:GridViewHeaderCell}" >
                <Setter Property="FontFamily" Value="Verdana"/>
                <Setter Property="FontSize" Value="12"/>
                <Setter Property="BorderThickness" Value=".2"/>
                <Setter Property="Background"  Value="#FF8CC63F"/>
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="BorderBrush" Value="#FF8CC63F"/>
                <Setter Property="FontWeight" Value="Bold"/>
            </Style>

            <Style TargetType="telerik:GridViewHeaderRow" >
                <Setter Property="Background" Value="#FF8CC63F" />
            </Style>
  2. Vikas
    Vikas avatar
    64 posts
    Member since:
    May 2014

    Posted 14 Jan 2015 in reply to Vikas Link to this post

    I found another thread that has a solution, but it is creating a different template
    <ControlTemplate x:Key="GridViewHeaderCellTemplate" TargetType="telerik:GridViewHeaderCell">

    I don't want to change the look of column headers just the back ground, mouse over and when they are clicked, is it not possible to jsut use style triggers to do that.

    Thanks
    Vikas
  3. Boris
    Admin
    Boris avatar
    276 posts

    Posted 15 Jan 2015 Link to this post

    Hello Vikas,

    In order to change the colors when a GridViewHeaderCell is in MouseOver and Selected States, you need to change the brushes used in GridView_HeaderBackground_Over and GridView_HeaderBackground_Selected border elements within the GridViewHeaderCellTemplate.

    For more information about the different brushes used you can check the Styling the Column Headers documentation article.

    I hope this helps.

    Regards,
    Boris
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top