Hi,
we are trying to use a kendo grid with angular, as follow
http://plnkr.co/edit/AkKBtTVWRrhvJyF8Kmfd?p=preview
and we found a strange behaviour: if you try to delete all the elements in the grid, you will see that the last one will persist in the angular tables.
Can you help us to understand why?
Thanks
5 Answers, 1 is accepted
For some reason Angular is failing to detect that the grid dataSource has changed.
You may need to manually cal $scope.$apply after removing the last item. You can use the change event in the datasource. Example: http://plnkr.co/edit/dygsLFYh9vRm8R9NBaSe?p=preview
Meanwhile we will take a look whether this is a bug in the datasource or not.
Regards,
Genady Sergeev
Telerik
Thank you for your help,
I have tested Angular-Kendo integration.
In the following example, the data source modifications did not apply on dynamicData variable, we need two-way binding for load/validation/save data.
http://plnkr.co/edit/1exSikM2NTFGarhGDgt6?p=preview
How we can get a constantly update dynamicData?
Is there other "smart" way to use grid?
Thanks,
Alessio
Hello Alessio,
sorry for the delay. the change: scope.apply configuration caused some javascript errors. I removed it and updated the kendo ui version, the example seems to be working as expected now.
Regards,Petyo
Telerik
I am sorry but I didn't understand your suggestions.
To remove "change" property causes the Kendo-Angular inconsistency and updating the libraries the behavior remains the same.
The last example doesn't seems to be working as expected and the update of the libraries doesn't fix errors.
http://plnkr.co/edit/pvgKdEY8NZYIaN32YYhy?p=preview
What's wrong?
How we can get a constantly update dynamicData?
Is there other "smarter" way to use grid?
Thanks
Hello Alessio,
I'm afraid that it is not possible to directly synchronize the dynamic data as it is not the same instance which is bound to the DataSource. AS you may know this data is wrapped in a ObserverableArray/ObservableObject instances when passed into the DataSource, thus the link between the variables is lost.
You can try exposing the dataSource data as a function instead. You should also keep manually updating the scope in the DataSource change event. Here is an updated version of the sample which demonstrates this in action.
Regards,
Rosen
Telerik