Mike Eghtebas
asked on
gridview cell color, c#
The existing code below, applies conditional format on a gridview (works fine). It applies shades to the entire row when it meets the criteria. This gridview has 3 columns in a row.
Question: How can I modify this code so that it will apply conditional format only to the last cell in a row?
Thank you.
Question: How can I modify this code so that it will apply conditional format only to the last cell in a row?
Thank you.
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.CssClass = "highlightBracketground";
var val = e.Row.Cells[2].Text;
var snglVal = Single.Parse(val);
e.Row.CssClass = snglVal > 0.0 ? "highlightBracketground" : "bracketground";
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER