All Components

Virtualization

Virtualization allows you to display large sets of data.

Regardless of the dataset size, the UI virtualization technique uses a fixed amount of list items in the popup list of the component. When the list is scrolled, the DropDownList reuses the existing items to display the relevant data instead of creating new data.

The following example demonstrates how to set the minimum configuration of the DropDownList and the DataSource to enable the virtualization.

<div id="vueapp" class="vue-app">
    <kendo-datasource ref="datasource"
                      :type="'odata'"
                      :transport-read-url="'https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders'"
                      :schema-model-fileds="fields"
                      :server-filtering="true"
                      :server-paging="true"
                      :page-size="80">
    </kendo-datasource>
    <kendo-dropdownlist ref="dropdownlist"
                        :data-source-ref="'datasource'"
                        :data-text-field="'ShipName'"
                        :data-value-field="'OrderID'"
                        :virtual-value-mapper="valueMapperFunction"
                        :virtual-item-height="26"
                        :height="520">
    </kendo-dropdownlist>
</div>
Vue.use(DropdownsInstaller);
Vue.use(DataSourceInstaller);

new Vue({
    el: "#vueapp",
    methods: {
        convertValues (value) {
            var data = {}
            value = $.isArray(value) ? value : [value]

            for (var idx = 0; idx < value.length; idx++) {
                data['values[' + idx + ']'] = value[idx]
            }

            return data
        },
        valueMapperFunction: function (options) {
            var that = this;

            $.ajax({
                url: 'https://demos.telerik.com/kendo-ui/service/Orders/ValueMapper',
                type: 'GET',
                dataType: 'jsonp',
                data: that.convertValues(options.value),
                success: function (data) {
                    options.success(data)
                }
            })
        },
    },
    data: {
        fields: {
            OrderID: { type: 'number' },
            Freight: { type: 'number' },
            ShipName: { type: 'string' },
            OrderDate: { type: 'date' },
            ShipCity: { type: 'string' }
        }
    },
    mounted() {
        var dropdownlist = this.$refs.dropdownlist.kendoWidget()
        dropdownlist.value(10600)
    }
})
In this article