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

No cross domain call

3 Answers 178 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 02 Sep 2011, 12:37 AM
Hi there,

We're trying first attempt at the DataSource, and it's not making the call....

var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                // the remote service url
                url: "/Query/GetNews",
 
            // JSONP is required for cross-domain AJAX
                dataType: "json"
            }
        }
    });

Does the DataSource NEED a http address?

Cheers

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 02 Sep 2011, 12:50 PM
Hello Tony,

If you attempt to perform cross domain call DataSource will need full address. See the configuration on the following demo:
http://demos.kendoui.com/datasource/index.html

Greetings,
Nikolay
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Vladimir
Top achievements
Rank 1
answered on 12 Sep 2011, 02:08 PM
Cross domain still doesn't work from local dev-server (localhost). 
[Origin http://localhost is not allowed by Access-Control-Allow-Origin.]

jQuery > 1.5 has an option for $.ajax called {crossDomain : true/false}, which allows me to perform cross domain ajax calls.

Is there a way to make similar ajax-setup in kendo ?

UPDATE:

I must apologize. Everything works very good. I just didn't pay enough time for reading documentation and examples.
0
King Wilder
Top achievements
Rank 2
answered on 16 Dec 2011, 07:31 PM
Vladimir, what was your solution?

Tags
Data Source
Asked by
Tony
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Vladimir
Top achievements
Rank 1
King Wilder
Top achievements
Rank 2
Share this question
or