我在vb.net Web应用程序中有一个网格视图。在网格视图中,我在鼠标悬停的gridview列上为工具提示添加了一个RowDataBound事件。但是工具提示没有显示IE和Chrome中网格视图列的所有文本,而在Mozilla中它显示的是没有任何滚动条的全文。是否可以在工具提示中使用滚动条。代码如下所示......
Protected Sub ManageMessageGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType.Equals(DataControlRowType.DataRow) Then
Dim lblMsglWithToolTip As Label = TryCast(e.Row.FindControl("lblMessage"), Label)
Dim lblMsgTitleWithToolTip As Label = TryCast(e.Row.FindControl("lblMessageTitle"), Label)
Dim strMsgFullText As String = lblMsglWithToolTip.Text
Dim strMsgTitleFullText As String = lblMsgTitleWithToolTip.Text
If lblMsglWithToolTip.Text.Length > 100 Then
lblMsglWithToolTip.Text = lblMsglWithToolTip.Text.Substring(0, 100) + "..."
End If
If lblMsgTitleWithToolTip.Text.Length > 20 Then
lblMsgTitleWithToolTip.Text = lblMsgTitleWithToolTip.Text.Substring(0, 20) + "..."
End If
lblMsglWithToolTip.ToolTip = strMsgFullText
lblMsgTitleWithToolTip.ToolTip = strMsgTitleFullText
End If
End Sub
任何帮助将不胜感激。谢谢。