ComboBoxes can use any type of Ext.data.Store as a data source.
This means your data can be XML, JSON, arrays or any other supported format. It can be loaded using Ajax, JSONP or locally.
The js is not minified so it is readable. See combos.js.
This ComboBox uses queryMode: 'remote'
to perform the query on a remote API which
returns book titles which match the typed string.
This ComboBox uses remotely loaded data, to perform querying client side.
This is suitable when the dataset is not too big or dynamic to be manipulated locally
This example uses a custom template for the dropdown list to illustrate grouping.
This ComboBox uses local data from a JS array:
This ComboBox uses the same data, but also illustrates how to use an optional custom template to create custom UI renditions for list items by overriding the getInnerTpl method. In this case each item shows the state's abbreviation, and has a QuickTip which displays the state's nickname when hovered over.
This ComboBox uses the same data once again, but allows selecting multiple values.
ComboBoxes can also be created from existing HTML <select>
elements on the page by
specifying the transform
config. This allows creation of rich ComboBox fields with autocompletion
and list filtering, in an unobtrusive way.