May 19, 2015, 12:41 PM
[FIXED] [#801] [3.2.0] setDisabled(false) not working for RadioGroup
I have a table
My onHandicapChange implementation ia as follows -
<table>
<tr>
<td>Do you have any disability ?</td>
<td>
@(X.RadioGroupFor(m => m.IsHandicap, new List<Radio.Config> {
new Radio.Config { BoxLabel = "Yes", InputValue = "1" },
new Radio.Config { BoxLabel = "No", InputValue = "0", Checked = true}
}).ID("IsHandicap").Width(400).Listeners(ls => ls.Change.Fn = "onHandicapChange").FireChangeOnLoad(true)
)
</td>
</tr>
<tr>
<td>(If yes, state the type of disability..)</td>
<td>@(X.RadioGroupFor(m => m.HandicapType, new List<Radio.Config> {
new Radio.Config { BoxLabel = "Chronic Illness", InputValue = "Chronic Illness"},
new Radio.Config { BoxLabel = "Physical Disability", InputValue = "Physical Disability" },
new Radio.Config { BoxLabel = "Impairment", InputValue = "Impairment" },
new Radio.Config { BoxLabel = "Others", InputValue = "Others" }
}).ID("HandicapType").Width(150).ColumnsNumber(1).Disabled(true))
</td>
</tr>
<tr>
<td colspan="2">@X.TextAreaFor(m => m.HandicapNature).ID("HandicapNature").Name("HandicapNature").LabelWidth(100).Width(500).Disabled(true).ReadOnly(Model.ReadOnly).Vtype("alpha")</td>
</tr>
</table>
My onHandicapChange implementation ia as follows -
var onHandicapChange = function () {
if (Ext.getCmp("IsHandicap").getValue().IsHandicap == 1) {
Ext.getCmp("HandicapType").setDisabled(false);
Ext.getCmp("HandicapNature").setDisabled(false);
} else {
Ext.getCmp("HandicapType").setDisabled(true);
Ext.getCmp("HandicapNature").setDisabled(true);
//Ext.getCmp("HandicapNature").setValue('');
}
}
The problem I am facing is - Ext.getCmp("HandicapType").setDisabled(false); is not enabling the Radio Buttons. Ext.getCmp("HandicapNature").setDisabled(false) works though.
Last edited by Daniil; Jun 23, 2015 at 11:28 AM.
Reason: [FIXED] [#801] [3.2.0]