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

Binding to the grid

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Li-raz
Top achievements
Rank 1
Li-raz asked on 06 Mar 2014, 07:56 PM
Although I am using AngularJS with the kendo-angular - I am trying to use the Grid, I want to bind the grid to an array, I read that if I am providing array as dataSource it will automatically convert it to dataSource, am I am loosing the direct binding? cause I want to change the array content and automatically the grid will be updated.

When I am trying to use array and not kendo-datasource i am getting exception

TypeError: Unable to get property 'create' of undefined or null reference
   at toDataSource (http://localhost:64968/Client/lib/angular/angular-kendo.js:16:9)
   at Anonymous function (http://localhost:64968/Client/lib/angular/angular-kendo.js:32:13)
   at $digest (http://localhost:64968/Client/lib/angular/angular.js:11501:21)
   at $apply (http://localhost:64968/Client/lib/angular/angular.js:11740:13)
   at Anonymous function (http://localhost:64968/Client/lib/angular/angular.js:13265:25)
   at completeOutstandingRequest (http://localhost:64968/Client/lib/angular/angular.js:4021:7)
   at Anonymous function (http://localhost:64968/Client/lib/angular/angular.js:4327:7) 

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 10 Mar 2014, 01:03 PM
Hello,

You can use source binding and MVVM like shown here:

http://trykendoui.telerik.com/oMOW/2

Or you can exactly what you shared, however first you have to make your array an observable array.

Here is another example:

http://trykendoui.telerik.com/oMOW/3

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