当前位置: 代码迷 >> ASP.NET >> 在Gridview上实现on mouse over,解决方法
  详细解决方案

在Gridview上实现on mouse over,解决方法

热度:9082   发布时间:2013-02-25 00:00:00.0
在Gridview上实现on mouse over,急!!!
当鼠标移到Gridview上FooterTemplate一个textbox上时显示一段信息?
高手些帮帮忙!


------解决方案--------------------------------------------------------
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Attributes.Add( "onmouseover ", "alert( 'aaaaaaaaaaaaaaaaaaaa ') "
}
}
------解决方案--------------------------------------------------------
<ItemTemplate>
<asp:Label ID= "Label5 " Height=10px Width=100px runat= "server " Text= ' <%# Eval( "EpSynopsis ").ToString().Length> 6 ? Eval( "EpSynopsis ").ToString().Substring(0,6)+ "... " : Eval( "EpSynopsis ") %> '
ToolTip= ' <%# Eval( "EpSynopsis ") %> '> </asp:Label>
</ItemTemplate>
------解决方案--------------------------------------------------------
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
TextBox text=e.Item.FindContol( "txt ") as TextBox ;
text.ToolTip= "######### ";
}
}
  相关解决方案