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

Change Row Background color based on condition

1 Answer 142 Views
GridView
This is a migrated thread and some comments may be shown as answers.
farizvi
Top achievements
Rank 1
farizvi asked on 25 Feb 2016, 12:34 PM

I've been trying to change the row background color in radgridview based on a condition

[code]

if(myCondition)

{

    var row = e.Row;
Style style = new Style(typeof(GridViewRow));
                style.BasedOn = e.Row.Style;

}

[/code]

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 25 Feb 2016, 01:41 PM
Hello,

The way to go is to use RowStyleSelector as demonstrated in this help article.

Regards,
Yoan
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
farizvi
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or