Sep 27, 2010, 5:22 PM
[CLOSED] [1.0] ComboBox automatically clears value?
Hi,
I have a combo box to be used as a search input field. When I type in something on it and tick the checkbox control below it, the typed in value is erased. How can I prevent this from happening?
Marcelo
I have a combo box to be used as a search input field. When I type in something on it and tick the checkbox control below it, the typed in value is erased. How can I prevent this from happening?
<ext:Panel ID="Panel2" runat="server" Border="false" Title="Search Catalog" Height="100" Width="450" Frame="true" LabelAlign="Right" Icon="Magnifier" CtCls="titleNormal" AutoScroll="true" BodyStyle="padding-left: 15px; padding-top: 5px;" Collapsible="false">
<Items>
<ext:ComboBox ID="TreatmentFilter" runat="server" EnableKeyEvents="true" HideTrigger="true" Width="400" EmptyText="Catalog Keyword Search" EnableViewState="true" CausesValidation="false" >
<Triggers>
<ext:FieldTrigger Icon="Search" HideTrigger="true" />
<ext:FieldTrigger Icon="Clear" HideTrigger="true" />
</Triggers>
<Listeners>
<BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();this.triggers[1][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
<TriggerClick Handler="if (index == 0) {} else if (index == 1) { this.clearValue(); this.triggers[0].hide(); } " />
</Listeners>
</ext:ComboBox>
<ext:Checkbox ID="chkbxTreatmentAllWords" runat="server" HideLabel="true" Name="" BoxLabel="Search for All Words" LabelSeparator=""></ext:Checkbox>
</Items>
</ext:Panel>
Regards,Marcelo
Last edited by Daniil; Sep 27, 2010 at 6:37 PM.
Reason: [CLOSED]