Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

What is the easiest way to include a tooltip in the gridView column?

For example in this column

<asp:BoundField DataField="short_comment" HeaderText="Comments" ReadOnly="True" SortExpression="short_comment"/>

I would like to have something like

<asp:BoundField DataField="short_comment" ToolTipDataField="longer_comment"/>

Obviously the ToolTipDataField does not exist, but what would be the easiest way to achieve that functionality?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
776 views
Welcome To Ask or Share your Answers For Others

1 Answer

Replaced with template

<asp:TemplateField HeaderText="Comments" SortExpression="short_comment">
     <ItemTemplate>
         <asp:Label ID="Label1" runat="server" Text='<%# Bind("short_comment") %>' ToolTip ='<%# Bind("longer_comment") %>'></asp:Label>
     </ItemTemplate>
</asp:TemplateField>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...