asp.net – GridView中的工具提示
发布时间:2020-12-16 00:07:11 所属栏目:asp.Net 来源:网络整理
导读:在gridView列中包含工具提示的最简单方法是什么? 例如,在此列中 asp:BoundField DataField="short_comment" HeaderText="Comments" ReadOnly="True" SortExpression="short_comment"/ 我想有类似的东西 asp:BoundField DataField="short_comment" ToolTipDa
在gridView列中包含工具提示的最简单方法是什么?
例如,在此列中 <asp:BoundField DataField="short_comment" HeaderText="Comments" ReadOnly="True" SortExpression="short_comment"/> 我想有类似的东西 <asp:BoundField DataField="short_comment" ToolTipDataField="longer_comment"/> 显然ToolTipDataField不存在,但实现该功能的最简单方法是什么? 解决方法
替换为模板
<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> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 使用ASP.NET webAPI上载文件(最大文件大小为10Mb)
- .net – 事件验证:允许__doPostBack用于一个控件和* any *
- asp.net-mvc – 我真的需要一个ORM吗?
- ASP.NET MVC页面不会加载并说“找不到资源”
- 使用ASP.net和VB.net(或C#)从XML文件编辑和删除数据
- asp.net-mvc – ASP.NET MVC检查Controller或Action中的自定
- asp.net-mvc-3 – TextBoxFor vs EditorFor,和htmlAttribut
- asp.net-mvc-3 – 实体框架插件架构推荐
- 修改FCKEditor实现将图片、文件等保存到数据库
- 如何在自动生成的列中隐藏ASP.NET GridView中的列?
推荐文章
站长推荐
- ASP.NET MVC 5和Bootstrap 3
- asp.net-mvc – NSubstitute:在MVC / Web Api控
- asp.net-web-api – 带有OWIN OAuth承载令牌的We
- 使用Asp.net Mvc3 Razor视图方式扩展JQuery UI W
- asp.net中执行exe应用程序
- Buddy Class中的必需属性不适用于Entity Framewo
- Asp.Net中ajax+ashx使用详解
- 在asp.net mvc中如何使用usercontrols来显示“岛
- 从ASP.NET Core Web API将多GB文件流式传输到AWS
- asp.net – 在Web.config中读取和编辑配置
热点阅读