Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Kendo UI Observables

Kendo UI Observables

The Backend Services JavaScript SDK data operations (read, update, etc.) can be used with instances of the kendo.data.ObservableObject and kendo.data.ObservableArray types.

kendo.data.ObservableObject

Here is a sample for creating an item by passing a Kendo UI observable object:

var el = new Everlive('your-app-id');
var observableObject = new kendo.data.ObservableObject({
    'Author': 'Harper Lee'
});
var data = el.data('type-name');
data.create(observableObject,
    function(data){
        alert(JSON.stringify(data));
    },
    function(error){
        alert(JSON.stringify(error));
    });

And this is a sample for updating an item by passing a Kendo UI object:

var el = new Everlive('your-app-id');
var observableObject = new kendo.data.ObservableObject(existingItem);
observableObject.set('Author', 'Updated Sample Text');

var data = el.data('type-name');
data.updateSingle(observableObject,
    function(data){
        alert(JSON.stringify(data));
    },
    function(error){
        alert(JSON.stringify(error));
    });

kendo.data.ObservableArray

Here is a sample for creating items by passing a Kendo UI observable array:

var el = new Everlive('your-app-id');
var observableArray = new kendo.data.ObservableArray([
    { 
        'Author': 'Sample Text' 
    }, { 
        'Author': 'Second Sample Text' 
    }]);

var data = el.data('type-name');
data.create(observableArray,
    function(data){
        alert(JSON.stringify(data));
    },
    function(error){
        alert(JSON.stringify(error));
    });
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.