I'm trying to bind a RadGrid to a Web API 2 OData Feed using the 2015 Q1 version of RadClientDataSource but the GET request to my feed includes a $callback parameter that the OData feed doesn't like.
Request URL looks like:
http://localhost:30569/Employees?$callback=jQuery19107930395885500925_1430850016577&%24inlinecount=allpages&%24format=json
The feed returns:
{
"error":{
"code":"","message":"The query parameter '$callback' is not supported."
}
}
I've set DataType="JSON" in the <Select> tag but when I view the page source it looks like this setting isn't flowing through to the injected Kendo:
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadClientDataSource, {"_id":"RadClientDataSource1","schema":{"data":"value","model":{"fields":[{"fieldName":"Id","type":"Number"},{"fieldName":"Name"},{"fieldName":"Department"}]}},"transport":{"serviceType":"odata","read":{"url":"http://localhost:30569/Employees"}}}, null, null, $get("RadClientDataSource1"));
});
You can see that the read: part is missing the dataType: "json"
What am I missing?
Here's the RadClientDataSource setup:
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server">
<DataSource>
<WebServiceDataSourceSettings ServiceType="OData">
<Select DataType="JSON" Url="http://localhost:30569/Employees" />
</WebServiceDataSourceSettings>
</DataSource>
<Schema DataName="value">
<Model>
<telerik:ClientDataSourceModelField FieldName="Id" DataType="Number" />
<telerik:ClientDataSourceModelField FieldName="Name" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="Department" DataType="String" />
</Model>
</Schema>
</telerik:RadClientDataSource>
Request URL looks like:
http://localhost:30569/Employees?$callback=jQuery19107930395885500925_1430850016577&%24inlinecount=allpages&%24format=json
The feed returns:
{
"error":{
"code":"","message":"The query parameter '$callback' is not supported."
}
}
I've set DataType="JSON" in the <Select> tag but when I view the page source it looks like this setting isn't flowing through to the injected Kendo:
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadClientDataSource, {"_id":"RadClientDataSource1","schema":{"data":"value","model":{"fields":[{"fieldName":"Id","type":"Number"},{"fieldName":"Name"},{"fieldName":"Department"}]}},"transport":{"serviceType":"odata","read":{"url":"http://localhost:30569/Employees"}}}, null, null, $get("RadClientDataSource1"));
});
You can see that the read: part is missing the dataType: "json"
What am I missing?
Here's the RadClientDataSource setup:
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server">
<DataSource>
<WebServiceDataSourceSettings ServiceType="OData">
<Select DataType="JSON" Url="http://localhost:30569/Employees" />
</WebServiceDataSourceSettings>
</DataSource>
<Schema DataName="value">
<Model>
<telerik:ClientDataSourceModelField FieldName="Id" DataType="Number" />
<telerik:ClientDataSourceModelField FieldName="Name" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="Department" DataType="String" />
</Model>
</Schema>
</telerik:RadClientDataSource>