日期:2014-05-18  浏览次数:20477 次

在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= "######### ";
}
}