Line binding events asp.net c #

 

OnRowDataBound = "hwd" added the GridView

---------------------------------------------------------------------

protected void hwd(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 10; i <= 16; i++)
{
TableCell hh = e.Row.Cells[i];
Single _f = Convert.ToSingle(hh.Text);
if (_f< 100)
{
//hh.ForeColor = System.Drawing.Color.Red;
hh.Text = "侯伟东";
}

if (_f > 100)
{
hh.ForeColor = System.Drawing.Color.Gray;
hh.Text = "优秀";
}
}
}

}

Guess you like

Origin www.cnblogs.com/houweidong/p/12322759.html