Edit this page


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 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 don not have a __state__ field.

Example - get the offline state

var dataSource = new kendo.data.DataSource({
    offlineStorage: "products-offline",
    transport: {
        read: {
            url: "https://demos.telerik.com/kendo-ui/service/products",
            dataType: "jsonp"
        update: {
            url: "https://demos.telerik.com/kendo-ui/service/products/update",
            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
    dataSource.at(0).set("ProductName", "Updated");
    // sync to accept the changes
    // get the offline data
    var offlineData = dataSource.offlineData();
    console.log(offlineData[0].__state__); // displays "update"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article