I am trying to figure out why the data in my grid disappears when i click the edit button and then immediately close out the popup.
I am trying to use the value binding features of Kendo UI and i cant seem to understand why they are being removed.
Here is a jsfiddle of what i am talking about. http://jsfiddle.net/JDMp8/13/
<div id="gridData">
<div
data-editable="popup"
data-role="grid"
data-bind="source: test"
data-columns="[
{field: 'ID', title: 'test'},
{command: ['edit', 'destroy'], title: 'test'}]"/>
var gridData = kendo.observable({
test:[
{ID: 1, Name: "Record 1"},
{ID: 2, Name: "Record 2"},
{ID: 3, Name: "Record 3"},
{ID: 4, Name: "Record 4"},
{ID: 5, Name: "Record 5"},
{ID: 6, Name: "Record 6"},
{ID: 7, Name: "Record 7"},
{ID: 8, Name: "Record 8"},
{ID: 9, Name: "Record 9"},
]
});
kendo.bind($('#gridData'), gridData);
I understand that i can use a data source rather than observable, but the actual view model i am using gets its data from the database and is nested a few layers down. The grid binds just fine but when i try to cancel or close the window it just gets removed.
How can i configure the value binding to prevent the results from being cleared?