This is a migrated thread and some comments may be shown as answers.

When Calling sync()

1 Answer 135 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Robert Kaucher
Top achievements
Rank 2
Robert Kaucher asked on 21 Mar 2013, 11:48 PM
"Object doesn't support property or method 'call'".


I am getting the above error when I try to call the sync method on the DataSource (Kendo UI Complete v2012.3.1315).

I am using the helper functions from Remco's post here:
http://www.kendoui.com/forums/framework/data-source/sharepoint-2010-datasource.aspx
forecastDataSource = new kendo.data.DataSource({
        batch: true,
        schema: {
            id: "Id",
            model: {
                fields: {
                    Year: { type: "number" },
                    Quantity: { type: "number" }
                }
            }
        },
        type: "odata",
        transport: {
            read: function (options) {
                var url = forecastReadUrl;
                read(url).done(options.success).fail(options.error);
            },
            update: function (options) {
                requestBatchUpdate(options.data.models, "PAR_Forecast({0})").done(options.success).fail(options.error);
            }
        },
        error: function (e) {
            com.showInfoError("Error: ", "Unable to get data for forecast. " + e.errorThrown);
        },
        requestStart: function (e) {
            // handle event
            alert("start");
        },
        requestEnd: function (e) {
        }
    });

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 25 Mar 2013, 02:37 PM
Hi Robert,

I would like to remind you that this code was not provided from a member of KendoUI Team. If you have any problems with it it would be best to contact its author.

As an assumption, I believe that the problem might be caused by the missing transport methods - create and destroy methods are not implemented. If the DataSource contains new or deleted records, upon sync it will try to call the respective transport methods.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Robert Kaucher
Top achievements
Rank 2
Answers by
Alexander Valchev
Telerik team
Share this question
or