Introduction to Kendo UI Integration

Introduction to Kendo UI Integration

Although the Backend Services JavaScript SDK works with plain JavaScript objects it can also work with the observable objects of Kendo UI framework. The instances of kendo.data.ObservableObject and kendo.data.ObservableArray keep their data attributes as their own properties and not in a dedicated object (as some other frameworks do). This means that Kendo UI observable instances can be passed to the creating and updating functions of the Backend Services JavaScript SDK.

The Backend Services JavaScript SDK also provides a predefined dialect for Kendo UI DataSource component. It supports server filtering, sorting, paging, and the CRUD operations of the DataSource. The dialect can be specified with this code:

You must instantiate the Backend Services Everlive global object before using the Kendo UI DataSource dialect.

var el = new Everlive('your-app-id');
var dataSource = new kendo.data.DataSource({
    type: 'everlive',
    transport: {
        typeName: 'type-name'
    },
    schema: {
        model: {
            id: Everlive.idField,
            fields: {
                'Author': {
                    defaultValue: ''
                }
            }
        }
    }
});

Set the type configuration option to everlive to switch to the Backend Services dialect, then set the transport.typeName to the name of the content type (this is a configuration option specific for the Backend Services dialect) and set the schema.model.id option (you can find more details about it here). Note that the transport.typeName and schema.model are mandatory in order for the Backend Services dialect to work.

See Also


Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.