使用XPath在Gridview中启用/禁用linkBut​​ton [英] Enabling/Disabling linkButton in Gridview with XPath

查看:88
本文介绍了使用XPath在Gridview中启用/禁用linkBut​​ton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在gridvview中有一个linkbutton,它链接到数据库中的文档.根据该文档的存在/不存在,我要启用/禁用它.
以下是我的代码:

< asp : TemplateField =恢复" ItemStyle-字体大小 =更大">

< ItemTemplate >

< asp : LinkBut​​ton =服务器" ="wingdings" CommandArgument =' <%#XPath("id")%> '

OnCommand ="GetResume" <%#IsEnabled((XPath(" id))%> '></ asp : </ ItemTemplate >

</ asp : TemplateField >

我尝试了使用double和single的不同组合引号等,但无法使之工作.
对此需要帮助.
谢谢.

解决方案

那里.

感谢您的发帖!我建议将您的问题发布到MS论坛之一中,

首页常规ASP .NET »数据表示控件

位于此处: http://forums.asp.net/24.aspx

祝您度过愉快的一天!


I have a linkbutton in the gridvview which links to a document in database.  Based on presence/absence of that document I want to enable/disable it.
Following is my code:

 

<asp:TemplateField HeaderText="Resume" ItemStyle-HorizontalAlign="Center" ItemStyle-Font-Size="Larger">

 

<ItemTemplate>

 

<asp:LinkButton runat="server" ID="lnkResume" Text="2" Font-Names="wingdings" CommandArgument='<%#XPath("id")%>'

 

OnCommand="GetResume" Enabled='<%# IsEnabled((XPath("id"))%>'></asp:LinkButton>

</ItemTemplate>

 

</asp:TemplateField>

I tried different combinations with the double and single quotes etc. but cannot make it work.
 Need help on this.
Thank you.

解决方案

Hi There.

 

Thank you for your post!  I would suggest posting your question in one of the MS forum,

HomeASP.NET Forums » General ASP.NET » Data Presentation Controls 

located here: http://forums.asp.net/24.aspx 

Have a great day!


这篇关于使用XPath在Gridview中启用/禁用linkBut​​ton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆