# Preselect MultiSelect Items by Using MVVM Binding

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Progress® Kendo UI® MultiSelect for jQuery</td>
 </tr>
 <tr>
  <td>Operating System</td>
  <td>Windows 10 64bit</td>
 </tr>
 <tr>
  <td>Visual Studio Version</td>
  <td>Visual Studio 2017</td>
 </tr>
 <tr>
  <td>Preferred Language</td>
  <td>JavaScript</td>
 </tr>
</table>

## Description

How can I preselect items by using MVVM binding in the Kendo UI MultiSelect widget?

## Solution

The following example demonstrates how to achieve the desired scenario.

```dojo
    <div id="example" >
      <div class="demo-section k-header">
        <h4>Products</h4>
        <button id="set">Set Source</button>
        <select data-role="multiselect"
                data-text-field="ProductName"
                data-value-field="ProductID"
                data-bind="{source: source, value: products}"
                ></select>
      </div>
      <script>
        $(document).ready(function() {
          var model = kendo.observable({
            products: [
              { ProductName: "Chang", ProductID: 2 },
              { ProductName: "Uncle Bob's Organic Dried Pears", ProductID: 7 }
            ],
            source: []
          });

          kendo.bind(document.body, model);

          $("#set").click(function() {
            var source = new kendo.data.DataSource({
              type: "odata-v4",
              serverFiltering: true,
              transport: {
                read: {
                  url: "https://demos.telerik.com/service/v2/odata/Products",
                }
              }
            });

            source.one("change", function() {
              debugger;
              var products = model.products;

              model.set("products", []);                
              model.set("products", products);                
            });

            model.set("source", source);
          })
        });
      </script>
      <style scoped>
        .demo-section {
          width: 400px;
        }
      </style>
    </div>

```

## See Also

* [MultiSelect JavaScript API Reference](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/multiselect)
* [Cascade from DropDownList](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/cascade-from-ddl)
* [Filter Values in Widgets Sharing the Same Data](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/distinct-values-in-widgets-sharing-same-data)
* [Select All Values with Single Selection](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/select-all-values-with-one-selection)
* [Use MultiSelect with Bootstrap Modal Window](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/using-widget-with-boostrap-modal)
* [Wire Blur Event of the Filter Input](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/wire-blur-event-of-filter-input)
