Gets or sets the offline state of the data source.


data Array

The array of data items that replace the current offline state of the data source.


Array—An array of JavaScript objects that represent the data items. Changed data items have a __state__ field attached. That field indicates the type of change: "create", "update", or "destroy". Unmodified data items do not have a __state__ field.

Example - get the offline state

var dataSource = new{
    offlineStorage: "products-offline",
    transport: {
        read: {
            url: "",
            dataType: "jsonp"
        update: {
            url: "",
            dataType: "jsonp"
        parameterMap: function(options, operation) {
            if (operation !== "read" && options.models) {
                return {models: kendo.stringify(options.models)};
    schema: {
        model: {
            id: "ProductID"

dataSource.fetch(function() {
    // go in offline mode;
    // change the ProductName field of the first data item"ProductName", "Updated");
    // sync to accept the changes
    // get the offline data
    var offlineData = dataSource.offlineData();
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(offlineData[0].__state__); // displays "update"
In this article