O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Autocompleting a combobox's value

ComboBoxes are a very handy control to use when creating a form, giving the user a convenient list of values you want them to choose from. However, these lists grow very long and the convenience starts to shrink as they are forced to trawl through a lengthy list of options.

Ext JS has provided us with the ability to allow comboboxes to autocomplete and select an option as we type, so we can find the correct value faster. This recipe will demonstrate how to set up this functionality.

How to do it...

  1. Our first step is to create an Ext.data.Store, which we will bind to our combobox to give it its list of values. Our example will display a list of car manufacturers:
    var carManufacturersStore = Ext.create('Ext.data.Store', ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required