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

Batch editing should use multipart mime message

2 Answers 87 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Remco
Top achievements
Rank 1
Remco asked on 17 Sep 2012, 03:57 PM
Hello,

I use kendo-ui datasource and grid with the SharePoint 2010 list odata service. I need to enable batch editing. As mentioned in this article:

http://msdn.microsoft.com/en-us/library/ff798339

the SharePoint 2010 list odata service supports batching though multipart mime messages. It appears kendo ui does batching by sending accross a request per operation type update/destroy/create (in what order?), where each request contains a collection of the objects involved, which requires a parameterMap as follows:

                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }

Does kendo ui support the multipart mime message way of doing batching?

cheers

Remco 

2 Answers, 1 is accepted

Sort by
0
Remco
Top achievements
Rank 1
answered on 17 Sep 2012, 04:16 PM
this is especially import as the SharePoint 2010 list odata service implements concurrency by round-tripping a concurrency token in http headers (an ETAG http header in a response and an If-Match http header in a request). Only by doing batching using a multipart mime message can you send the corresponding concurrency token for each operation in the batch, right?
0
Remco
Top achievements
Rank 1
answered on 21 Sep 2012, 08:08 AM
I managed to get batch editing working for the SharePoint 2010 list odata/rest service with the kendo ui datasource using the Microsoft datajs library (http://datajs.codeplex.com/). It would be good though if I could combine the create, update and destroy operations in the same batch as well. It would be even better if I could combine the create, update and destroy operations of multiple datasources in the same batch. That would allow me to insert a new Order and its Order_Details in a single batch / unit of work / transaction.


Tags
Data Source
Asked by
Remco
Top achievements
Rank 1
Answers by
Remco
Top achievements
Rank 1
Share this question
or