行绑定事件 asp.net c#

时间:2020-02-17 18:28:32   收藏:0   阅读:91

 

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 = "优秀";
}
}
}

}

原文:https://www.cnblogs.com/houweidong/p/12322759.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!