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

Can't send through parameters, or pick up JSONP format?

0 Answers 38 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 31 Aug 2012, 02:45 PM
I know I'm missing something here, I have to be, although I've had the issue before and never got around it. What I'm doing is:

var ds = new kendo.data.DataSource({
     transport: {
            read: "http://localhost/HOLService/HOLService.svc/GetFiles",
            dataType: "jsonp",
            data: {
                    roleId: function() { return 1; }
               }
            },
           parameterMap: function (data, operation) {
           if (operation != "read") {
                  return { jsonData: kendo.stringify(data.models) };
            }
        }
});

ds.read();

What this does is send a call to "http://localhost/HOLService/HOLService.svc/GetFiles", but there's no roleId parameter, or callback required from JSONP.

Can anyone see what I'm missing here?


Update:
Sorry, ignore this, I didn't have my parameters in the read: {} array.

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Chris
Top achievements
Rank 1
Share this question
or