DropDownButton Data Binding
The DropDownButton enables you to bind its popup to an array of primitive values (strings and numbers) or to an array of objects through the data input.
Arrays of Primitive Data
The following example demonstrates how to bind the DropDownButton to an array of primitive data.
Arrays of Complex Data
When the DropDownButton is bound to complex data (objects), the component displays the text field of each item by default. To use another field, set textField to its name. The configured field takes precedence over text.
Data items can also set disabled, icon, svgIcon, iconClass, imageUrl, and click. The click field runs a function when the user selects that item. For the complete list of item fields, see ListItemModel.
To customize the popup item content, see Item Templates.
The following example demonstrates how to bind the DropDownButton to object data.