This project is read-only.

Dynamically set the row colour on multiple conditions

Dec 27, 2013 at 1:10 AM
Is it possible to set the row colour dynamically based on multiple conditions? Eg: If value > 60 row colour is green and value <50 row colour is red. Its working perfectly for one condition.
Dec 27, 2013 at 2:29 AM
Hi

Try this:
.SetRowCssClasses(item =>
    {
        if (item.Value > 60)
            return "green";
        if (item.Value > 50)
            return "yellow";
        return "white";
    })
Marked as answer by Bukharin on 1/8/2014 at 7:00 PM
Dec 29, 2013 at 9:47 PM
Thank you for the reply. It worked.
Nov 26, 2014 at 10:38 AM
Sorry , i need a help with this problem. How make this?

what is section of gridmvc.css ?

/ Grid headers /
/ Grid body /

Please help!