我想让用户把鼠标放到单元格上面时鼠标上方出现一个气泡,显示该列表头的文字。
用e.Row.Cells[i].Attributes.Add("onmouseover",。。
如何做?

解决方案 »

  1.   

    在RowDataBound事件中
            e.Row.Cells[i].Attributes.Add("onmouseover", " hshow();");
            e.Row.Cells[i].Attributes.Add("onmouseout", " hnone();");
    在html中
       function hshow()
        {
            document.getElementById('Img1').style.display='';
        }
        function hnone()
        {
            document.getElementById('Img1').style.display='none';
        }类似这样,在html中写入你要的内容
      

  2.   

    不是在GridView1_RowCreated里写?
      

  3.   


    RowDataBound 才填充了内容