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 AutoComplete 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 ComboBox 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-fields="fields"
                      :server-filtering="true"
                      :server-paging="true"
                      :page-size="80">
    </kendo-datasource>
    <kendo-combobox ref="combobox"
                    :data-source-ref="'datasource'"
                    :data-text-field="'ShipName'"
                    :data-value-field="'OrderID'"
                    :virtual-item-height="26"
                    :virtual-value-mapper="valueMapperFunction"
                    :height="520">
    </kendo-combobox>
</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 combobox = this.$refs.combobox.kendoWidget()
        combobox.value(10600)
    }
})
In this article