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

JSON from Dataservice

2 Answers 103 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Sadhvi
Top achievements
Rank 1
Sadhvi asked on 31 Aug 2015, 11:21 AM

Hi,

 We are trying to display data from a wfc data service, in a Kendo treelist UI control.  The data bind is not happening and "request failed" keeps showing up. From what we saw it seems to be an issues due to the format of the data although type = 'jsonp' has been specified. Could you please guide us with some of the version requirements for the entity framework and if we need to explicitly do anything in the data service to get the right format. In the data that the service returns the header -  "d":[{"__metadata"] is seen.

 

Thanks!!

 

 

2 Answers, 1 is accepted

Sort by
0
Sadhvi
Top achievements
Rank 1
answered on 31 Aug 2015, 01:59 PM

Also tried using dataType = "json", and it says no records to be displayed. I can see that the data is being retrieved from the url. In this case - "odata.metadata":http://localhost:52239/​MyService.svc/$metadata#My_Entity,"value" appears as the header. The dataset has null entries for parentId as well.

Can we use OData as an input format to the treelist or does it have to be json? Neither seem to work for us.

 

Thanks!

0
Kiril Nikolov
Telerik team
answered on 02 Sep 2015, 07:08 AM

Hello Sadhvi,

 

Can you consume the service with a standard Ajax call? I am asking this in order to verify that the problem is related to the Kendo UI DataSource. 

 

In general the data binding for the TreeList is not different that any other widgets - the grid for example, so please check the following examples as they might be helpful:

 

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid

 

And yes you can use oData as well - it uses JSON as well.

 

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