Apr 15, 2011, 5:33 PM
[CLOSED] Combobox Previous Value
Hi, hopefully I can describe what is happening in an understandable way.
The combobox below is tied to a web service. When the page is coming up at the start it is pre-populated with a value. So it has a value and I want a new value I click into the combobox and clear it by backspacing or highlighting and hitting the delete key. Then I trigger the search by hitting the icon on the right or pressing the down arrow key. When the results come back from the web service and a dropdown list appears, the previous value appears back in the combobox. Oddly enough I have found that it is only the first time trying to delete the value that I have the problem. Any ideas on what is going on?
The combobox below is tied to a web service. When the page is coming up at the start it is pre-populated with a value. So it has a value and I want a new value I click into the combobox and clear it by backspacing or highlighting and hitting the delete key. Then I trigger the search by hitting the icon on the right or pressing the down arrow key. When the results come back from the web service and a dropdown list appears, the previous value appears back in the combobox. Oddly enough I have found that it is only the first time trying to delete the value that I have the problem. Any ideas on what is going on?
<ext:ComboBox ID="CPM" runat="server"
DisplayField="Value" ValueField="Value"
QueryParam="CPM"
Width="200" Height="10"
AllowBlank="true"
AutoDataBind="true" AutoShow="true"
EnableShadow="true" ForceSelection="false"
HideTrigger="false" ItemSelector="div.search-item"
LoadingText="Searching..." MaxLength="100"
MinChars="0" Mode="Default"
Selectable="true" SelectOnFocus="true"
TriggerAction="Query"
TriggerIcon="Search" Truncate="true"
TypeAhead="false">
<Store>
<ext:Store ID="StoreCPM" runat="server" AutoLoad="false" ShowWarningOnFailure="true" >
<Proxy>
<ext:HttpProxy Method="GET" Url="http://server/WebServices/data/app.asmx/SR?appKey=PRD.Cpm" />
</Proxy>
<Reader>
<ext:XmlReader Record="r">
<Fields>
<ext:RecordField Name="id" />
<ext:RecordField Name="Text" />
<ext:RecordField Name="Value" />
</Fields>
</ext:XmlReader>
</Reader>
<Listeners>
<LoadException Handler="Ext.Msg.alert('CPM - Load failed', (!Ext.isEmpty(e) && !Ext.isEmpty(e.message)) ? e.message : response.statusText);" />
</Listeners>
<BaseParams>
<ext:Parameter Name="UserId" Value="GetEmpId()" Mode="Raw" />
<ext:Parameter Name="DirectReports" Value="GetDirectReports()" Mode="Raw" />
</BaseParams>
</ext:Store>
</Store>
<Template ID="TemplateCPM" runat="server">
<Html>
<tpl for=".">
<div class="search-item" >
<h3><span>{Value}</span></h3>
</div>
</tpl>
</Html>
</Template>
<Listeners>
<BeforeQuery Handler="delete queryEvent.combo.lastQuery;" />
</Listeners>
</ext:ComboBox>
Last edited by Daniil; Apr 25, 2011 at 7:59 AM.
Reason: [CLOSED]