Hi again,
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:
Code:
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"];
if (status.Contains("Artwork"))
{
e.Row.BackColor = System.Drawing.Color.Green;
e.Row.ForeColor = System.Drawing.Color.White;
if (ReqTime.Year.Equals(CurrentTime.Year))
{
if (ReqTime.DayOfYear.Equals(CurrentTime.DayOfYear))
{
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:
Code:
flash{
text-decoration:blink
}
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...
Andrew Berry