提示在GridView控件 [英] Tooltip in GridView
本文介绍了提示在GridView控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是包含在GridView列工具提示的最简单方法?
What is the easiest way to include a tooltip in the gridView column?
例如在此列
<asp:BoundField DataField="short_comment" HeaderText="Comments" ReadOnly="True" SortExpression="short_comment"/>
我想有像
<asp:BoundField DataField="short_comment" ToolTipDataField="longer_comment"/>
显然 ToolTipDataField
不存在,但是这将是实现这一功能的最简单的方法?
Obviously the ToolTipDataField
does not exist, but what would be the easiest way to achieve that functionality?
推荐答案
与模板替换
<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>
这篇关于提示在GridView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文