Ext.net combobox 的disabled

时间:2023-03-08 16:51:57
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="">
<DirectEvents>
<Check OnEvent="Radio1_check" />
</DirectEvents>
</ext:Radio>
<ext:Radio ID="Radio2" runat="server" BoxLabel="否" InputValue="" 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;
}
}