Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- orders.controller('OrdersCtrl', function ($scope, $http, $rootScope, $location, $notification, $routeParams) {
- // this works
- $scope.initGrid = function () {
- $scope.gridData = new kendo.data.ObservableArray([
- { artist: "Pink Floyd", track: "The dark side of the Moon" },
- { artist: "The Beatles", track: "I've just seen a face" },
- { artist: "Queen", track: "Innuendo" }
- ]);
- $scope.gridColumns = [
- { field: "artist", title: "Artist" },
- { field: "track", title: "Track" }
- ];
- };
- // this does not working
- $scope.update = function() {
- $scope.gridData[0].set("track", "Hey you");
- };
- });
- <button kendo-button ng-click="update()">
- Update from code
- </button>
- TypeError: Cannot read property '0' of undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement