5 Answers, 1 is accepted
0
Hello,
How does this work for you?
Regards,
Dimitrina
Telerik
In case you need to apply a background to a cell and persist the default highlight of a row you should use a color, which allows transparency:
For example:
<Style TargetType=
"telerik:GridViewCell"
BasedOn=
"{StaticResource GridViewCellStyle}"
>
<Setter Property=
"Background"
Value=
"#197709E6"
/>
</Style>
Regards,
Dimitrina
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.
0

Cuong
Top achievements
Rank 1
answered on 16 Jan 2015, 10:22 AM
Thanks Dimitrina, it's a good way.
But Is there any way to change cell color into row color (no transparency)?
But Is there any way to change cell color into row color (no transparency)?
0
Hello Ciong,
Looking at the template structure of GridViewRow, the element DataCellsPresenter is over all elements, that paint the background of the cell in its states. DataCellsPresenter is responsible for displaying all cells.
By that reason when you color a cell, all effects from the row appear in that way. In that case you should use a color, which allows transparency.
Regards,
Vanya Pavlova
Telerik
Looking at the template structure of GridViewRow, the element DataCellsPresenter is over all elements, that paint the background of the cell in its states. DataCellsPresenter is responsible for displaying all cells.
By that reason when you color a cell, all effects from the row appear in that way. In that case you should use a color, which allows transparency.
Regards,
Vanya Pavlova
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.
0

Cuong
Top achievements
Rank 1
answered on 21 Jan 2015, 02:50 AM
In my case, I must to color some columns of GridView.
But when I select a row or hover on it, I want to color the row (override column color).
Please help me.
But when I select a row or hover on it, I want to color the row (override column color).
Please help me.
0
Hi Cuong,
I believe that this is the way to go.
If you modify the position of DataCellsPresenter, the visual elements, that paint the background of the row in any state will hide the content of the cells.
If you want to use equal colors I may suggest you to modify the template of GridViewRow and change the Background of the element with x:Name Background_Selected.
It's Background property should be the same, as the one defined for the column with transparency.
Regards,
Vanya Pavlova
Telerik
I believe that this is the way to go.
If you modify the position of DataCellsPresenter, the visual elements, that paint the background of the row in any state will hide the content of the cells.
If you want to use equal colors I may suggest you to modify the template of GridViewRow and change the Background of the element with x:Name Background_Selected.
It's Background property should be the same, as the one defined for the column with transparency.
Regards,
Vanya Pavlova
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.