按钮可见性取决于下拉列表值, [英] Button visibility depending on dropdownlist value,

查看:82
本文介绍了按钮可见性取决于下拉列表值,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下拉列表是或否如果保存后选择是,则网格视图中的记录中的编辑按钮如果选择是,则会消失,在javascript或jquery中,任何帮助请

 <   div     class   =  controls >  
< asp:DropDownList ID = ddMovetoStore CssClass = input-large runat = server >
< asp: ListItem 文字 = = >
< asp:ListItem 文本 = = >

< br / >
< < span class =code-leadattribute> span style = 颜色:红色; font-size:10px; > 选择是,您将无法编辑或删除此记录< / span >
< / div >



网格视图按钮编辑:

 <   itemtemplate  >  
<% - <%if container.dataitem(bitPrimary)= 1则%> - %>
< asp:ImageButton ID = ImageButton1 < span class =code-attribute> runat = server ImageUrl = ../ images / edit.png CommandArgument =' <% #Eval( ID)%>' CommandName = 编辑 文字 = / >
< / itemtemplate >

解决方案

从以下示例中学习和改编:

 <   head     runat   = 服务器 >  
< script src = http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js >
< / script >
< script >


(function(){


ddl =

i have dropdown list yes or no if yes is selected after saving then edit button in record in the grid view should disappear if yes is selected,,in javascript or jquery,,any help please

<div class="controls">
                                <asp:DropDownList ID="ddMovetoStore" CssClass="input-large"  runat="server">
                                <asp:ListItem Text="No" Value="No">
                                <asp:ListItem Text="Yes" Value="Yes">
                                
                                <br />
                                <span style="color:Red; font-size:10px;">By selecting yes you will not be able to edit or delete this record</span>
                            </div>


grid view button edit:

<itemtemplate>
                                 <%--   <% if container.dataitem("bitPrimary") = 1 then %>--%>
                           <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/edit.png" CommandArgument='<%# Eval("ID")%>' CommandName="Edit" Text="" />
</itemtemplate>

解决方案

Learn and adapt from the following sample:

<head runat="server">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
    </script>
    <script>


(function () {


ddl =


这篇关于按钮可见性取决于下拉列表值,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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