conditional color of horizontal line

2 posts, 0 answers
  1. David Ocasio
    David Ocasio avatar
    170 posts
    Member since:
    Nov 2009

    Posted 01 Jul 2015 Link to this post

    This is a request from a customer .

    I have multiple rows in a grid that are related (used in printing) .

    I would like the first horizontal grid line of the related items a different color.

    (see attached image)

    what is the best way to achieve this if it is possible.

    It is not MVVM so I have no problem trying to affect it in the events of the grid.

     any assistance would be appreciated.


  2. Stefan
    Stefan avatar
    1073 posts

    Posted 06 Jul 2015 Link to this post

    Hello David,

    You should be able to achieve such visual appearance via RowStyleSelector. For the GridViewRows that you need to have such horizontal line, you can define a Style as follows:
    <Style TargetType="telerik:GridViewRow">
        <Setter Property="BorderThickness" Value="0 5 0 0"/>
        <Setter Property="BorderBrush" Value="Red"/>

    Can you please the approach a try and let me know should you need any further assistance?

    Best Regards,
    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
Back to Top