I have a local variable ($scope.objects) that contains an array of objects.
I have a kendoGrid that has a dataSource that uses the $scope.objects as its data. This grid has the "destroy" command; when I click the "destroy" button, it removes the item from the grid, but not from $scope.objects. Is there any way to bind/sync these two (dataItems in grid and $scope.objects) together?
I found a few ways to handle this, but it all required me to manually change $scope.objects.
01.
$scope.objects = [{...}, {...}, {...}];
02.
$scope.dataSource =
new
kendo.data.DataSource({
03.
data: $scope.objects,
04.
//...
05.
});
06.
$scope.grid = $(
"grid"
).kendoGrid({
07.
dataSource: $scope.dataSource,
08.
//...
09.
});
I am also looking for something similar for create and update.