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

kendogrid add row error with odata

0 Answers 142 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Fdg
Top achievements
Rank 1
Fdg asked on 13 Feb 2012, 09:36 AM
Hi

I'm using kendo grid with odata.
My datasource is classical (many options have been tested). Something like:

var

myDS = new kendo.data.DataSource({

type: "odata",

transport: {

read: { url: "http://localhost:2000/Ajax/Lists/PassageDataService.svc/Passages/"  

 //, dataType: "json"
}},

schema: {

data: "d.results", model: {id: "SeqId", fields: myObject}

},

pageSize: 10,

serverPaging: true,

serverFiltering: true,

serverSorting: true,

sort: { field: "SeqId" }

});


When i Try to add objet to my data source with

 myDS.add(myObject);

the object is added (I can see it on firebug), all goes fine but when i look at the page the new object is not on the kenod grid and firebug show an error "d.d is not defined"

If i use Json instead of odata, add object works fine but the rest is broken (pagging filtering etc with dataservice).

Anyone has every tried to add row on buton click event to kendo grid using odata and dataservice?

thanks,
Laurent

No answers yet. Maybe you can help?

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