ComboBox combines the functionality of a single-line text editor, button editor and dropdown list editor. The editor's dropdown displays a list of items that can be selected by end-users. Selecting an item changes the editor's edit value.
To learn more about ComboBox and see it in action, refer to our online demos.
ComboBox is realized by the ComboBoxExtension class. Its instance can be accessed via the ExtensionsFactory.ComboBox helper method, which is used to add a ComboBox extension to a view. This method's parameter provides access to the ComboBox's settings implemented by the ComboBoxSettings class, allowing you to fully customize the extension.
The editor's contents can be generated dynamically by binding the editor to a data source, as well manually populating the editor's item collection. When retrieving items from the data source, item characteristics such as the text, value, and image are obtained from specific data fields that can be defined manually or are obtained automatically providing the data fields named in a specific way. See the Binding Data Editors to Data topic to learn more.
All items are loaded to the client side, so all data operations (such as scrolling, filtering) are performed on the client, without generating a round trip to the server.
Items are loaded from the server on demand, via callbacks. For instance, list items that are not currently displayed within the editor's dropdown window can be dynamically loaded when an end-user scrolls the list. This callback mode makes the first page load much faster, since only a few items need to be initially loaded.
You can enable your end-users to filter list items dynamically, based upon the text typed into the editor's input box on the client side (find-as-you-type filtering). The following filter modes are available.
The editor is filtered for list items that begin with the search string.
The editor is filtered for list items that contain the search string. The found search string is highlighted within items for clarity.
The ComboBox enables you to implement custom filtering logic on the server and client sides. For example, you can filter items by several words and multiple columns simultaneously or filter items that contain diacritic characters. Refer to the Custom Filtering for more information.
It's possible to represent the ComboBox's list data in several columns. This functionality is in effect if the editor's items collection is obtained from a data source. You can also define a column's header caption, width, visibility state and other settings for columns.
The ComboBox editor provides a collection to maintain its custom edit buttons. Each button exposes a set of properties allowing the button's appearance and behavior to be defined. The settings of the default button, which invokes the dropdown window when clicked, can be customized as well.
The ComboBox extension allows you to perform data validation both on the client and server side. See the Built-in Validation topic to learn more.
Full-Featured Client-Side API
You can modify the editor behavior using the following methods.