I need to be able to make a row of text flash depending on a comparison I make.
This is done in the c# class in my project. I currently have the filter working
My code is below:
if (e.Row.RowType == DataControlRowType.DataRow)
String status = (String)((System.Data.DataRowView)e.Row.DataItem)["LastOpDesc"];
DateTime CurrentTime = DateTime.Now;
//System.DateTime CurrentDate = System.DateTime.Now;
DateTime ReqTime = (DateTime)((System.Data.DataRowView)e.Row.DataItem)["RequiredTime"];
e.Row.BackColor = System.Drawing.Color.Green;
e.Row.ForeColor = System.Drawing.Color.White;
if (((System.Int32)ReqTime.Hour) - ((System.Int32)CurrentTime.Hour) < 4)
e.Row.CssClass = "StyleSheet.css";
e.Row.BackColor = System.Drawing.Color.DarkOliveGreen;
I currently draw the lines Olive Green so I can check my logic works, which it does.
The bit I am struggling with is referencing the css class.
Stylesheet.css contains only the following:
I'm not sure how to apply the css effect I have called flash to the text on the gridview row if it meets the constraints.
Any help is muchly appreciated...