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

Not able to retrieve json from external website

1 Answer 85 Views
Show your code
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ashutosh
Top achievements
Rank 1
Ashutosh asked on 16 Jul 2015, 02:07 PM

Hi,

I'm trying to show json data into kendo grid. I had tried a lot but can't figured out the problem.

Thanks

<!DOCTYPE html>
<html>
 
<head>
 
    <title></title>
</head>
 
<body>
    <div id="grid">
    </div>
    <script>
        $(function () {
 
            $("#grid").kendoGrid({
                columns: [{
                        title: "Name",
                        field: "Name"
                    },
                    {
                        title: "Quantity",
                        field: "Quantity__c"
                    },
                    {
                        title: "Price",
                        field: "Price__c"
                    },
                    {
                        title: "Id",
                        field: "Id"
                    }],
                dataSource: {
                    transport: {
                        read: {
                            type: "GET",
                            url: "http://alle-developer-edition.ap2.force.com/services/apexrest/Marchandise/",
                            dataType: "jsonp",
                            crossDomain:true
                             
                        }
                    },
                    schema: {
                        data: function (data) {
                            return data;
                        }
                    },
                    pageSize: 5
                },
                sortable: {
                    mode: "multiple"
                },
                pageable: true
 
            });
        });
    </script>
</body>
 
</html>

1 Answer, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 21 Jul 2015, 08:30 AM
Hello Ashutosh,

You have submitted your support inquiry for Kendo UI Professional under the Telerik AppBuilder product. I am afraid that AppBuilder forums does not include support for the product you are using and we cannot provide a resolution for your technical question. That is why I'd suggest that you consult the Kendo UI forums or the referenced there community resources. Also, if you company holds a license for Kendo UI professional, please, contact the license holder to submit a support ticket for the appropriate product.

On a side note, I noticed that the web services should be reached only over HTTPS. Also, it does return the response in XML format. Given that you need to adjust the data source configuration and the web service to communicate better with each other.

Perhaps the Kendo UI resources available in this repository will be helpful to align your service configuration and the data source. In this demo you can see how the data source can be bound to an XML.

Regards,
Anton Dobrev
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Show your code
Asked by
Ashutosh
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question
or