Util.HighlightIf: How do I use this?

SixSixTrample
edited October 2012 in General
I'm trying to highlight a row if a certain column contains a certain value.

I have something like this:
select new  {
assetid = r.ASSETID, 
sourceid = r.SOURCE_ID, 
salekey = pst.SALEKEY,
relid = r.RELATIONSHIP_ID, 
relname = r.RELATIONSHIP_NAME, 
borName = r.BORROWER_NAME,
status = Util.Highlight(pst.SALEKEY == saleKey ? "In sale" : "Not In Sale")
}
Right now. And that highlights the status field, but I want to highlight the entire row. How would I do that?

Comments

  • Util.HighlightIf is for conditional highlighting:

    Purchases.AsEnumerable().Select (p => new { p.Date, Description = Util.HighlightIf (p.Description, d => d.StartsWith ("B")) })

    This will highlight the description if it starts with "B".

    There's no way to highlight an entire row.
  • Ah! Ok, well that at least let's me highlight only if it meets the criteria. Thank you!