zoukankan      html  css  js  c++  java
  • gridview 实现鼠标悬浮行提示行中列的信息

     protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

        {          for (int i = 0; i < e.Row.Cells.Count; i++)//获取总列数    

         {           

      //如果是数据行则添加title             if (e.Row.RowType ==DataControlRowType.DataRow )       

          {             

    Label ibl=(Label) e.Row.FindControl("Label1") as Label;

                {//设置title为gridview的head的text             

        e.Row.Cells[i].Attributes.Add("title", DataBinder.Eval(e.Row.DataItem, "Audit").ToString());    

             }       

          }     

        }    

    }

  • 相关阅读:
    20191117-STD::讲解及求平均数例题
    计算机网络-ip分类
    游标cursor
    ajax
    django ORM
    urls
    templates
    views
    models
    setting
  • 原文地址:https://www.cnblogs.com/zhangjinpeng/p/4109746.html
Copyright © 2011-2022 走看看