All Components

DropDowns Overview

The DropDowns allow you to choose from a predefined list of options.

Basic Usage

The following example demonstrates how to initialize the AutoComplete, ComboBox, DropDownList, MultiColumnComboBox, and MultiSelect.

<div id="vueapp" class="vue-app">
    <div class="col-xs-12 col-sm-6 example-col">
        <p>AutoComplete</p>
        <kendo-autocomplete :data-source="dataSourceArray"
                            :placeholder="'Your favorite sport'"
                            :separator="', '"
                            :filter="'contains'">
        </kendo-autocomplete>
    </div>

    <div class="col-xs-12 col-sm-6 example-col">
        <p>ComboBox</p>
        <kendo-combobox :data-source="dataSourceArray"
                        :filter="'contains'"
                        :index="0">
        </kendo-combobox>
    </div>

    <div class="col-xs-12 col-sm-6 example-col">
        <p>DropDownList</p>
        <kendo-dropdownlist :data-source="dataSourceArray"
                            :index="0">
        </kendo-dropdownlist>
    </div>

    <div class="col-xs-12 col-sm-6 example-col">
        <p>MultiSelect</p>
        <kendo-multiselect :data-source="dataSourceArray"
                           :filter="'contains'">
        </kendo-multiselect>
    </div>

    <div class="col-xs-12 col-sm-6 example-col">
        <p>MultiColumnComboBox</p>
        <kendo-multicolumncombobox :data-source="multiColumnArray"
                                   :filter="'contains'"
                                   :filter-fields="['name']"
                                   :data-text-field="'name'"
                                   :data-value-field="'name'"
                                   :columns="columnsDefinitions">
        </kendo-multicolumncombobox>
    </div>
</div>
Vue.use(DropdownsInstaller);

new Vue({
    el: "#vueapp",
    data: function() {
        return {
            dataSourceArray: [
                'Football',
                'Tennis',
                'Basketball',
                'Baseball',
                'Cricket',
                'Field Hockey',
                'Volleyball'
            ],
            multiColumnArray: [{
                name: 'Andrew Fuller',
                company: 'Progress'
            },{
                name: 'Nancy Davolio',
                company: 'Progress'
            },{
                name: 'Sirma Franks',
                company: 'Progress'
            },{
                name: 'John Waltham',
                company: 'Telerik'
            },{
                name: 'Fritz Dong',
                company: 'Progress'
            }],
            columnsDefinitions: [{
                field: 'name'
            },{
                field: 'company'
            }]
        }
    }
})

Installation

To initialize the DropDowns, either:

Initializing with Webpack

  1. Install Kendo UI and add a theme.

    npm install --save @progress/kendo-ui
    npm install --save @progress/kendo-theme-default
  2. Install the Kendo UI DropDowns package for Vue.

    npm install --save @progress/kendo-dropdowns-vue-wrapper

    The package also exports the following wrappers for individual components:

    • AutoComplete
    • ComboBox
    • DropDownList
    • MultiColumnComboBox
    • MultiSelect
  3. Import the Kendo UI packages to the App component. If you use the Kendo UI components more than once in your application, add all Kendo UI-related files to the main.js file. If you use the Kendo UI components once in your application, add the Kendo UI-related files the component where they will be referred.

    import '@progress/kendo-ui'
    import '@progress/kendo-theme-default/dist/all.css'
    
    import { AutoComplete,
            ComboBox,
            DropDownList,
            MultiSelect,
            MultiColumnComboBox,
            MultiColumnComboBoxColumn,
            DropdownsInstaller } from '@progress/kendo-dropdowns-vue-wrapper'
    
    Vue.use(DropdownsInstaller)
    
    new Vue({
       el: '#app',
       components: {
           AutoComplete,
           ComboBox,
           DropDownList,
           MultiSelect,
           MultiColumnComboBox,
           MultiColumnComboBoxColumn
       }
    })
In this article