Edit this page

dataTextField String (default: "")

The field of the data item that provides the text content of the list items. Based on this field, the widget filters the data source.

If you define the dataTextField option, you also have to set dataValueField.

Example - set the dataTextField

<select id="listBox"></select>
    dataSource: [
        { name: "Item 1", id: 1 },
        { name: "Item 2", id: 2 }
    dataTextField: "name",
    dataValueField: "id"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article