[CLOSED] Read-Only SelectBox where keystrokes are ignored

  1. #1

    [CLOSED] Read-Only SelectBox where keystrokes are ignored

    Is it possible to have a read-only SelectBox where all keystrokes are ignored?

    In the following simple example, if I place my mouse in the SelectBox and press the "Page Up" or "Page Down" key the selected item changes. Similarly if I type the first letter of one of the items, the selected item changes. I know I could probably set the SelectBox to disabled, but that would gray out the control which I'd like to avoid.

    thanks


            <ext:SelectBox ID="lstTest" runat="server" ReadOnly="true" >
                <Items>
                    <ext:ListItem Value="1" Text="One" />
                    <ext:ListItem Value="2" Text="Two" />
                    <ext:ListItem Value="3" Text="Three" />
                    <ext:ListItem Value="4" Text="Four" />
                    <ext:ListItem Value="5" Text="Five" />
                    <ext:ListItem Value="6" Text="Six" />
                    <ext:ListItem Value="7" Text="Seven" />
                    <ext:ListItem Value="8" Text="Eight" />
                </Items>
            </ext:SelectBox>
    Last edited by Daniil; Apr 26, 2012 at 8:21 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please add
    <Listeners>
        <AfterRender Handler="this.el.un('keydown', this.keySearch, this, true);" />
    </Listeners>
    for the SelectBox.
  3. #3
    Daniil - that worked. You can mark this is closed.

    thanks

Similar Threads

  1. Cannot get SelectBox value
    By Irmak in forum 2.x Help
    Replies: 4
    Last Post: Jun 07, 2012, 5:49 PM
  2. [CLOSED] Problem with selectbox under IE
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 30, 2011, 10:06 AM
  3. Replies: 4
    Last Post: Oct 24, 2011, 3:34 AM
  4. [CLOSED] isDirty() and SelectBox
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 07, 2010, 1:42 PM
  5. [CLOSED] SelectBox triggers
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 25, 2009, 9:38 AM

Posting Permissions