Results 1 to 6 of 6

Thread: Combobox is not scrolled automatically to the selected item.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default Combobox is not scrolled automatically to the selected item.

    Hi,

    I want combobox to show currently selected item on top of the drop-down list.
    Say, I have 100 items in my combobox, item 70 is selected but it is not shown to the user just after down arrow is clicked and list is expanded, user needs to scroll the list down in order to find currenly selected item.

    Is it possible to bring the selected item on top of the list?

    Thanks.

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    Does Sencha Team have an idea?

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,388
    Vote Rating
    499
      0  

    Default

    I recall this was an issue with older version of ExtJS4, but it should be resolved. What version you are using?

    Scott.

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Boston
    Posts
    86
    Vote Rating
    5
      0  

    Default

    You could try something like the following:
    Code:
    Ext.create('Ext.form.ComboBox', {
        fieldLabel: 'Choose State',
        store: states,
        queryMode: 'local',
        displayField: 'name',
        valueField: 'abbr',
        renderTo: Ext.getBody(),
        listeners: {
            select: function (combo, records, eOpts) {
                var node = combo.picker.getNode(records[0]);
                combo.picker.listEl.insertFirst(node);
            }
        }
    })
    But using local queryMode you should never have to scroll to the selection.

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Location
    Detroit
    Posts
    1
    Vote Rating
    0
      0  

    Default

    I was experiencing the same.. Code helped me out, thanks!!

  6. #6
    Sencha User
    Join Date
    Sep 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Combobox is not scrolled automatically to the selected item.

    hello i am using the easy ui combobox in which i am binding 100 items now when i select the value from drop down and save in database i can set the selected value of combobox item number 41 but need to scroll it.

    How can i scroll automatically for select value in easyui combobox.

    Please help me out.

    Thanks,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •