http://dotnet.aspx.cc/ShowDetail.aspx?id=E5254FD8-252F-457C-F61E-32EE353E8BF2把变色部分改为改提示即可

解决方案 »

  1.   

    怎样实现当鼠标停留在datagrid的一行上时立即出现提示信息,并且提示信息不自动消失,直到鼠标移出该行时提示信息才消失.
      

  2.   

    private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
    {
    if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
    {
    e.Item.Attributes["onmouseover"]="this.name=this.style.backgroundColor;this.style.backgroundColor='yellow';"; 
    e.Item.Attributes["onmouseout"]="this.name=this.style.backgroundColor;this.style.backgroundColor='#ffffff';"; 
    //e.Item.Attributes["ondbclick"]="window.open('***.aspx?id=" + e.Item.Cells[0].Text + "','newwin','')";
    }
    if(e.Item.ItemIndex>-1)
    {
    System.Web.UI.WebControls.HyperLink h = (HyperLink)e.Item.Cells[15].FindControl("HyperLink1");
    h.ToolTip=h.Text;//在提示中显示完整信息
    if(h.Text.Length>2)
    {
    h.Text=h.Text.Substring(0,2)+"....";
    }
    }
    }
      

  3.   

    我还是不明白?我得意思就是在csdn结帖给分时出现的哪个黄色的框一样,当鼠标离开时黄色的框才消失,如果鼠标不离开黄色的框就不消失.
      

  4.   

    上面的代码意思是
    给HyperLink 控件增加onmouseover脚本事件,改变HyperLink的ToolTip属性?
    懂了吗?