# Cascade MultiSelects from DropDownLists

## 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 cascade the Kendo UI MultiSelect from a Kendo UI DropDownList?

## Solution

The following example demonstrates how to achieve the desired scenario.

```dojo
    <div>
      supplier: <select id="suppliers"></select>
    </div>
    <div>
      product: <select id="products"></select>
    </div>
    <script>
      $(function() {
        var productsDataSource = new kendo.data.DataSource({
          type: "odata-v4",
          serverFiltering: true,
          transport: {
            read: {
              url: "https://demos.telerik.com/service/v2/odata/Products",
            }
          }
        });

        $("#products").kendoMultiSelect({
          autoBind: false,
          dataTextField: "ProductName",
          dataValueField: "ProductID",
          dataSource: productsDataSource
        });

        $("#suppliers").kendoDropDownList({
          optionLabel: "Select supplier",
          dataTextField: "CompanyName",
          dataValueField: "SupplierID",
          dataSource: {
            type: "odata-v4",
            serverFiltering: true,
            transport: {
              read: {
                url: "https://demos.telerik.com/service/v2/odata/Suppliers"
              }
            }
          },
          change: function() {
            var filters = buildFilters([this.dataItem()]);
            productsDataSource.filter(filters);
          }
        });

        function buildFilters(dataItems) {
          var filters = [];
          var length = dataItems.length;
          var supplierID;
          var idx = 0;

          for (; idx < length; idx++) {
            supplierID = parseInt(dataItems[idx].SupplierID);

            if (!isNaN(supplierID)) {
              filters.push({
                field: "SupplierID",
                operator: "eq",
                value: supplierID
              });
            }
          }
          return filters;
        }
      });
    </script>
```

## See Also

* [MultiSelect JavaScript API Reference](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/multiselect)
* [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)
* [Preselect Items Using MVVM Binding](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/preselect-items-using-mvvm)
* [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)
