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

Change row back color according to the values of a column

4 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff Tang
Top achievements
Rank 1
Jeff Tang asked on 19 Dec 2008, 07:34 AM
I want to change the back color of the row if the column1's value is equal to "X". How can I do this in server side code? Thanks.

4 Answers, 1 is accepted

Sort by
0
Steve Y
Top achievements
Rank 2
answered on 19 Dec 2008, 08:10 AM
There was a Telerik blog about this a little while back. Check it out at this link to see if this works for you.

http://blogs.telerik.com/blogs/08-11-21/Conditional_Formatting_rows_in_RadGridView.aspx

Regards, Steve
0
Jeff Tang
Top achievements
Rank 1
answered on 19 Dec 2008, 08:25 AM
I think it doesn't mentioned.
0
Steve Y
Top achievements
Rank 2
answered on 19 Dec 2008, 08:29 AM
Hi Jeff,

Here's the text from the blog.

  • It can be useful at times to draw the users attention to a certain row or rows in a grid.  You might want to point out an account that is about to expire or show that an entry requires approval.  Normally, you would evaluate the data in the grid yourself to change the BackColor of a row.  The RadGridView offers you the ability to create a condition that will apply certain formatting for you.  I have created a simple class that will allow us to display a few laptop orders.

Is this not what you were looking for? Here's the link again.

http://blogs.telerik.com/blogs/08-11-21/Conditional_Formatting_rows_in_RadGridView.aspx

Regards, Steve
0
Steve Y
Top achievements
Rank 2
answered on 19 Dec 2008, 08:40 AM
Jeff,

Here's another link to something that might help. It was at the bottom of the blog article. I know it's not exactly what you're asking for but maybe you would find it useful.

http://www.telerik.com/help/aspnet-ajax/grdconditionalformatting.html

Regards, Steve
Tags
Grid
Asked by
Jeff Tang
Top achievements
Rank 1
Answers by
Steve Y
Top achievements
Rank 2
Jeff Tang
Top achievements
Rank 1
Share this question
or