Jun 27, 2012, 9:43 AM
[CLOSED] Combo box KeyUp handler getting multiple calls
The Listener for the ComboBox "updateModuleCombobox" gets called twice for each key press. Any suggestions why please ?
Thanks
R.
Thanks
R.
<ext:ComboBox ID="AssignmentParent" runat="server"
HideTrigger="false" StoreID="ModuleStore"
DisplayField="ModuleNameString"
ValueField="ModuleID"
LoadingText="Searching..."
FieldLabel="Parent Module"
TypeAhead="false"
TriggerAction="All"
ListWidth="600"
ForceSelection="false"
EmptyText="Start Typing Module Name..."
ItemSelector="div.list-item"
SelectOnFocus="false"
MinChars="4"
QueryDelay="250"
Width="625"
QueryParam="filter"
Mode="Local"
>
<Template ID="Template1" runat="server">
...
</Template>
<Listeners>
<KeyUp Handler="RefreshModuleStore(item.getRawValue())" />
</Listeners>
</ext:ComboBox>
[DirectMethod]
public void RefreshModuleStore(string filterpassed)
{
System.Diagnostics.Debug.WriteLine("In RefreshModuleStore");
if (filterpassed.Length >= 4)
{
ModuleDataSource.SelectParameters["filter"].DefaultValue = filterpassed;
ModuleStore.DataBind();
}
}
Last edited by rich27; Jun 29, 2012 at 1:36 PM.
Reason: fix [CODE] brackets