zoukankan      html  css  js  c++  java
  • Ext.net combobox 的disabled

    C#:禁用combobox

    this.ComboBox7.Disabled =true;

    C#:隐藏

     <ext:RadioGroup ID="RadioG_sfzg" runat="server" GroupName="RadioGroup" FieldLabel="是否第一<font color=red>*</font>" Cls="x-check-group-alt" Visible="false">
    
    使用的是Visible="false" 这个属性,后台没找到类似的设置 .

    aspx:

      <ext:RadioGroup ID="RadioG" runat="server" GroupName="RadioGroup" FieldLabel="是否第一<font color=red>*</font>" Cls="x-check-group-alt" >
           <Items>
                  <ext:Radio ID="Radio1" runat="server" BoxLabel="" InputValue="1">
                            <DirectEvents>
                                          <Check OnEvent="Radio1_check" />
                             </DirectEvents>
                   </ext:Radio>
                   <ext:Radio ID="Radio2" runat="server" BoxLabel="" InputValue="0" Checked="true">
                               <DirectEvents>
                                             <Check OnEvent="Radio2_check" />
                               </DirectEvents>
                   </ext:Radio>
            </Items>
       </ext:RadioGroup>

    <ext:ComboBox ID="ComboBox7" runat="server" FieldLabel="第一名<font color=red>*</font>" EmptyText="请选择..." TypeAhead="true" ForceSelection="false" Mode="Local" StoreID="Store6" DisplayField="Name" ValueField="Id" MinChars="0" ListWidth="150" AnchorHorizontal="92%" />


    C#:对应的 Radio1_check Radio2_check 函数

            protected void Radio1_check(object sender, DirectEventArgs e){
                if (this.Radio1.Checked)
                {
                    this.ComboBox7.Disabled = false;
     
                }
               
            }
            protected void Radio2_check(object sender, DirectEventArgs e)
            {
                if (this.Radio2.Checked)
                {
                    this.ComboBox7.Disabled = true;
                }
            }
  • 相关阅读:
    获取其他进程中StatusBar的文本
    TStringGrid多选的复制与拷贝
    常用数据结构
    数据结构及算法
    时间复杂度和空间复杂度详解
    算法的时间复杂度和空间复杂度
    新增并管理媒体资源
    Node.js与MongoDB的基本连接示例
    Web API 2:Action的返回类型
    快递查询组件
  • 原文地址:https://www.cnblogs.com/BinBinGo/p/6708487.html
Copyright © 2011-2022 走看看