行绑定事件 asp.net c#
OnRowDataBound="hwd" 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 = "优秀";
}
}
}
}
天道酬勤,厚积薄发。
君子之行,静以修身,俭以养德。
非淡泊无以明志,非宁静无以致远。
如有恒,何须三更起,半夜眠;最怕莫,三天打鱼两天晒网,竹篮打水一场空。