# Data Binding

The ListBox provides options for binding it to local data arrays and remote data services.

## Binding to Local Data

When you use complex data objects, use the `dataTextField` and `dataValueField` properties to notify the widget of your preferred binding behavior.

```dojo
    <select id="listbox"></select>

    
    <script>
        $(document).ready(function(){
            $("#listbox").kendoListBox({
                dataSource: [
                    { name: "Jane Doe" },
                    { name: "John Doe" }
                ],
                template: "<div>#:name#</div>",
                toolbar: {
                    tools: [ "moveUp", "moveDown", "remove" ]
                }
            });
        });
    </script>
```

## Binding to Remote Data

The following example demonstrates how to bind the ListBox to a remote data service.

```dojo
    <style>
       .k-listbox{
         width: 300px
       }
    </style>
     <select id="listbox"></select>

    
    <script>
        $(document).ready(function(){
            $("#listbox").kendoListBox({
                dataSource: {
                    transport: {
                        read: "https://demos.telerik.com/service/v2/core/Customers"
                    }
                },
                dataTextField: "ContactName",
                dataValueField: "CustomerID",
                toolbar: {
                    tools: [ "moveUp", "moveDown", "remove" ]
                }
            });
        });
    </script>
```

## See Also

* [Basic Usage of the ListBox (Demo)](https://demos.telerik.com/kendo-ui/listbox/index)
* [JavaScript API Reference of the ListBox](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/listbox)
