This is a migrated thread and some comments may be shown as answers.

conditional color of horizontal line

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
David Ocasio asked on 01 Jul 2015, 02:33 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 06 Jul 2015, 08:50 AM
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"/>
</Style>

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

Best Regards,
Stefan
Telerik
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
Tags
GridView
Asked by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Stefan
Telerik team
Share this question
or