The add method in this sample updates the local data source. Is there anyway this sample can work with a remote data source (configured using transport property). It only adds to my local collection.
http://jsfiddle.net/derickbailey/D4g8S/
1 Answer, 1 is accepted
0
Accepted
Alexander Valchev
Telerik team
answered on 07 May 2013, 07:24 AM
Hello Anil,
In this sample the DataSource is configured for using hard-coded list of items, which is why the add method modifies only the local data array.
// A hard coded list of items to render
var tasks = [
{ id: 1, done: false, description: "do stuff"},
{ id: 2, done: false, description: "more stuff"},
{ id: 3, done: true, description: "this stuff to do"},
{ id: 4, done: false, description: "that stuff we need"}
];
// Build the data source for the items
var dataSource = new kendo.data.DataSource({ data: tasks });
If you want use remote data, you should bind the DataSource to remote data via Ajax transport.