Combo box KeyUp handler getting multiple calls

  1. #1

    [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.

      <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
  2. #2
    Hi,

    Welcome to Ext.NET!

    I am unable to reproduce. What browser do you test with?
  3. #3
    Hi,

    I get this with IE9.0.8... and with FF 13.0.01

    R
  4. #4
    I am unable to reproduce.

    Please provide a full sample to copy, paste and run without any changes from our side.
  5. #5
    Hi,

    thanks for the help

    I've solved it now - the "KeyUp" handler is passing presses to the shift key in - so when I try to type upper case characters I'm thought I was getting two calls for the same key (the combobox.getRawValue() doesn't change for all keys!)

    thanks
    R.

Similar Threads

  1. Combo box event handler
    By Shuaib in forum 1.x Help
    Replies: 1
    Last Post: Oct 10, 2012, 1:59 PM
  2. [CLOSED] Question about event calls by combo box value.
    By rosua in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 19, 2012, 11:53 AM
  3. Prevent multiple calls to DirectMethod
    By glenh in forum 1.x Help
    Replies: 0
    Last Post: May 03, 2012, 12:00 AM
  4. [CLOSED] Validation Before Call to Handler with Multiple Forms
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 12, 2012, 3:43 PM
  5. Multiple AjaxMEthods Calls
    By styrpe in forum 1.x Help
    Replies: 4
    Last Post: Mar 20, 2009, 6:03 PM

Posting Permissions