How can I change the background color of a row using GridMvc? I've looked at the posting here:
Changing Background of GridMvc Column on Condition
I've tried using the SetRowCssClasses property (see below) but nothing happens. So, I don't know if I'm using it incorrectly or I need to do more than what I have in the below. Given that I'm relatively new to MVC and definitely new to GridMvc, it could be both. So, any help on what I need to change to get the rows where the bitTestOrderFlag is true to red is appreciated.
Thank you.
@Html.Grid(Model).SetRowCssClasses(i => i.bitTestOrderFlag ? "cssClassRed" : string.Empty).Columns(columns =>
{
columns.Add(c => c.intOrderNumber).Titled("Order Number")
.Encoded(false)
.Sanitized(false)
.SetWidth(30)
.RenderValueAs(o => Html.ActionLink(o.intOrderNumber.ToString(), "GetOrderDetails", "Orders", new { orderNumber = o.intOrderNumber }, null));
columns.Add(c => c.strCustomerNumber).Titled("Customer Number");
columns.Add(c => c.dtEntryDate).Titled("Entered Date").Format("{0:MM/dd/yyyy}");
columns.Add(c => c.strBillToName).Titled("BillTo Name");
columns.Add(c => c.strBillToStreetAddr).Titled("BillTo Street Address");
columns.Add(c => c.strBillToCity).Titled("BillTo City");
columns.Add(c => c.strShipToName).Titled("ShipTo Name");
columns.Add(c => c.strShipToStreetAddr).Titled("ShipTo Street Address");
columns.Add(c => c.strShipToCity).Titled("ShipTo City");
columns.Add(c => c.strPoNumber).Titled("PO Number");
columns.Add(c => c.bitTestOrderFlag).Titled("TestOrder");
}).WithPaging(8)