IW1QLH

  • Increase font size
  • Default font size
  • Decrease font size

Change rows style in a GridView

E-mail Print PDF
ASPX.CS C# - How to change rows style in a GridView

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow) 
    {
        if ((( Convert.ToDateTime(((DataRowView)e.Row.DataItem)["field_expire"]) < DateTime.Now)
            e.Row.Font.Strikeout = true;
    }
}


{moscomment}



Last Updated on Friday, 27 October 2006 16:39