【发布时间】:2018-08-20 18:37:14
【问题描述】:
我需要帮助为网格制作可选择/可复制的工具提示。这是来自 Aspx 文件的代码。
<asp:GridView ID="gridView" runat="server"
AutoGenerateColumns="false"
onrowdatabound="gridView_RowDataBound"
EmptyDataText="No Records found."
AllowSorting="True"
<Columns>
<asp:CommandField visible="false" ShowEditButton="false" ShowCancelButton="false" ShowDeleteButton="false" />
<asp:TemplateField HeaderText="ColumnID" Visible="false">
<ItemTemplate>
<asp:Label ID="ColumnIDLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ColumnID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Account Number">
<ItemTemplate>
<asp:Label ID="AccountNumberlabel" ReadOnly='true' runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "hashedAccount") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField>
</Columns>
<asp:GridView>
我正在从代码隐藏文件中添加工具提示。
Protected Sub gridView_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If User.HasAttribute("Access", "Enable") Then
e.Row.ToolTip = e.Row.DataItem.Row.ItemArray(1)
End If
End If
我可以看到工具提示正在加载正确的数据。但我无法选择工具提示。如何使工具提示可选择。任何建议,将不胜感激。
【问题讨论】:
标签: webforms tooltip clickable jquery-ui-selectable