# Data and Value Binding

The MultiSelect enables you to configure its predefined list of options and selected values.

To set the predefined option list, use the [`data`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#data) property. To set the selected values, use the [`value`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#value) property.

## Data Binding

To bind the MultiSelect to data, use the [`data`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#data) property of the component.

The `data` property accepts both:

* [Arrays of primitive values](https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect/binding#arrays-of-primitive-values) and
* [Datasets of objects](https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect/binding#datasets-of-objects).

### Arrays of Primitive Values

The following example demonstrates how to bind the MultiSelect to an array of primitive values.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dropdowns/multiselect/primitive-value/func/source.txt)

### Datasets of Objects

If the MultiSelect is bound to a dataset of objects, the [`textField`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#textfield) property needs to be set and the value of the component will be an array of the selected objects.

By default, the MultiSelect compares the items by reference. To specify a field from the data object which will be used for the comparison, utilize the [`dataItemKey`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#dataitemkey) property. The `dataItemKey` property is useful when the references to the selected items which are configured in the `value` or `defaultValue` property do not match their corresponding items from the `data` collection. If `dataItemKey` is not set and the references in `data` and `value` do not correspond, the selected items will not be highlighted in the drop-down list.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dropdowns/multiselect/complex-value/func/source.txt)

## Value Binding

To render the selected values, use the [`value`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#value) property of the MultiSelect. If you set the value through the `value` property, hook up to the [`onChange`](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops#onchange) event and manually update the value of the `value` property.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dropdowns/multiselect/controlled/func/source.txt)

## Suggested Links

* [Learn about KendoReact Free.](https://www.telerik.com/kendo-react-ui/components/getting-started/free-vs-premium)

* [API Reference of the MultiSelect](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/multiselectprops)

* [Controlled Components in React](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components)
