We have a angularJS project and we work also with Kendo UI (Grid)
We want to bind the Grid dataSource with $http Service.
All the official examples of AngularJS & Kendo are binding to local dataSource or WCF(.svc) links:
http://demos.telerik.com/kendo-ui/grid/angular (attached src1)
Can you show me or send a reference for best practice way to bind kendo with $http Service.
thanks in advance.
8 Answers, 1 is accepted
I added this as a small example into the documentation regarding the Grid when used with Angular:
I've another issue using Professional Kendo UI, binding Grid with AngularJS $http service
I've modified the demo and shared here :
1) If I change a demo project I at-least see a network activity for http://filltext.com
2) But I do NOT see a grid on page !
if I try the code below
Nor, I see the grid view at all !
Any idea what's happening ?
Also, the AngularJS service function call I've mentioned in the code snippet above, has the following definition.
In your example the schema.data option is not needed, since you return the data in an array, without an object with a "d" key. Here is the working example:
I'm trying to do the same as in the examples you posted, but also for the create method of the datasource transport object.
So, in my create method, I use the angular $http library and in the corresponding success and error callbacks, I do options.success() and options.error() respectively (where options is the argument to the create method).
However, what I notice is that when I have an error returned from the $http call, which triggers the error callback, an empty grid line is added to the grid anyway, and subsequent clicks on the button to re-send the data seem to trigger more AJAX calls (one more for each click, so on the 5th click it will trigger 5 failed AJAX calls).
What could I be doing wrong?
My create method looks something like this:
Would it be possible to open a separate ticket and send us a runnable sample where the issue can be reproduced, and we will be happy to help.
Telerik by Progress