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

Problem of set dataSource as a JavaScript Array

1 Answer 73 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ming
Top achievements
Rank 1
Ming asked on 24 Apr 2014, 02:54 AM
Hello,

My testing code:  http://trykendoui.telerik.com/ObaV

It's happened When I created new task, and I want to edit it,
but I think the Popup window is not edit-window, 
because it doesn't have the 'Delete' button.

When I clicked the 'Cancel' button, 
the task I created would be removed!

It doesn't happen if I set dataSource with transport.
Does any configuration I need to set?

Thanks for your help,
Ming

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 25 Apr 2014, 03:07 PM
Hello Ming,

This happens because the ID of the new item is not populated, thus it is being treated as new item event after the save button is clicked (see related article). Usually the ID is assigned by the server, however you could create a custom transport methods and make the create method set a unique ID to each new item.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Ming
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or