Sep 08, 2010, 6:15 AM
Readonly Property
Hi,
I am trying to implement Data with details example in my form. I am facing problem while making controls read only specifically to Combobox, datepicker and Checkbox.
1) If I set the combo box as readonly I can still select the value using dropdown button. Same is the case with datepicker.
2) When I set Checkbox as readonly=true it works perfectly but when I try to set it false again it still behaves like readonly. i.e. I am unable to Check it or Uncheck it.
I am trying to implement Data with details example in my form. I am facing problem while making controls read only specifically to Combobox, datepicker and Checkbox.
1) If I set the combo box as readonly I can still select the value using dropdown button. Same is the case with datepicker.
2) When I set Checkbox as readonly=true it works perfectly but when I try to set it false again it still behaves like readonly. i.e. I am unable to Check it or Uncheck it.
<ext:FormPanel runat="server" MonitorValid="true" ID="formPanel1" HideLabel="false" LabelWidth="150" LabelAlign="Left" ButtonAlign="Center" AutoScroll="true" Height="500" Border="false">
<Body>
<ext:FormLayout ID="FormLayout1" runat="server" StyleSpec="padding:10">
<ext:ComboBox runat="server" ID="cmbAccountType" FieldLabel="Account Type" StoreID="stAccountType" DisplayField="accounttype" ValueField="accounttype" ReadOnly="true"></ext:ComboBox>
</ext:Anchor>
<ext:Anchor>
<ext:Checkbox runat="server" FieldLabel="Active" Checked="false" ID="chkCompActive" ReadOnly="true"></ext:Checkbox>
</ext:Anchor>
<ext:Anchor>
<ext:DateField runat="server" FieldLabel="Last Inv Date" ID="dtLastInvDate" Format="dd/MM/yyyy" ReadOnly="true"></ext:DateField>
</ext:Anchor>
</ext:FormLayout>
</Body>
<Buttons>
<ext:Button runat="server" ID="btnEdit" Text="Edit">
<Listeners>
<Click Handler="#{cmbAccountType}.setReadOnly(false);#{dtLastInvDate}.setReadOnly(false);#{chkCompActive}.setReadOnly(false);" />
</Listeners>
</ext:Button>
</Buttons>