zoukankan      html  css  js  c++  java
  • 绑定gridview的时候,如果发现某条记录满足一定条件,那么改行记录背景色变成红色

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        
    {

            
    if (e.Row.RowType == DataControlRowType.DataRow)
            
    {
                
    if (e.Row.Cells[0].Text == "1")
                
    {
                    e.Row.BackColor 
    = System.Drawing.Color.Red;
                }

                
    else
                
    {
                    e.Row.BackColor 
    = System.Drawing.Color.Blue;
                
                }

            }

    }


     

  • 相关阅读:
    10-12
    8-10
    5.2-5.3
    四则运算 测试与封装
    第5-7章
    汉堡包
    1-5章
    实验二
    实验一
    Controller方法是如何与请求匹配上的及参数如何填充的
  • 原文地址:https://www.cnblogs.com/ami/p/638324.html
Copyright © 2011-2022 走看看