Display grid lines when disabled

3 posts, 1 answers
  1. Etienne
    Etienne avatar
    51 posts
    Member since:
    Sep 2014

    Posted 21 May 2015 Link to this post


    I use Expression Dark theme with RadGridView and when the gridview is disabled, cells' border are hidden. I'm trying to display them anyway. I've been able to display vertical lines, but I can't find what to change to prevent hidding horizontal lines.

    Thank you,


  2. Answer
    Dimitrina avatar
    3769 posts

    Posted 26 May 2015 Link to this post

    Hi Etienne,

    In order to modify the default behavior, you should edit the default control template of GridViewCell. To learn how to style Telerik UI for WPF you can read the common topics on Setting a Theme (Using Implicit Styles) and Editing Control Templates

    As to the specific question, one way would be to comment the ObjectAnimationUsingKeyFrames code for Disabled VisualState:
    <VisualStateGroup x:Name="DisabledStates">
        <VisualState x:Name="Enabled"/>
        <VisualState x:Name="Disabled">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Opacity">
    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.3"/>
    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0">
                    </DiscreteObjectKeyFrame>            </ObjectAnimationUsingKeyFrames>-->        </Storyboard>

    You can find attached a demo project. Please note, I also modified the GridView_GridLinesItemBorder color to be Yellow, for a better visual representation:
    <!--Color modified-->
    <SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="Yellow"/>

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Etienne
    Etienne avatar
    51 posts
    Member since:
    Sep 2014

    Posted 29 May 2015 in reply to Dimitrina Link to this post

    Hi Dimitrina,

    Thanks for your solution, it works great!


Back to Top