I am trying to fill a Kendo Mobile ListView with data retrieved from a WCF Data Service WebGet with no luck. Is there something I am missing.
WCF Method:
[WebGet]
public IQueryable<AttributeType> GetRanges()
{
var ranges = (from pa in this.CurrentDataSource.ProductAttributes
where pa.oDataAttTypeDesc == "Range"
select new AttributeType() { Name = pa.oDataAttValue }).Distinct().OrderBy(a => a);
return ranges;
}
Hitting the URL gives:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
</GetRanges>
DataSource is setup as follows:
DataSources._Ranges = new kendo.data.DataSource({
type: "odata",
transport: {
read: {
url: "http://localhost:54948/ProductDataService.svc/GetRanges"
}
}
});
and the html page sets the control as follows:
$("#range-listview").kendoMobileListView({
dataSource: kendo.data.DataSource.create({ data: DataSources._Ranges }),
template: "${Name}"
});
WCF Method:
[WebGet]
public IQueryable<AttributeType> GetRanges()
{
var ranges = (from pa in this.CurrentDataSource.ProductAttributes
where pa.oDataAttTypeDesc == "Range"
select new AttributeType() { Name = pa.oDataAttValue }).Distinct().OrderBy(a => a);
return ranges;
}
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <element p2:type="ODataSearch.AttributeType"xmlns:p2="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Name>All Manufacturers</Name>
</element>
- <element p2:type="ODataSearch.AttributeType"xmlns:p2="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Name>Aqualisa</Name>
</element>
- <element p2:type="ODataSearch.AttributeType" xmlns:p2="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Name>Bristan</Name>
</element>
DataSource is setup as follows:
DataSources._Ranges = new kendo.data.DataSource({
type: "odata",
transport: {
read: {
url: "http://localhost:54948/ProductDataService.svc/GetRanges"
}
}
});
and the html page sets the control as follows:
$("#range-listview").kendoMobileListView({
dataSource: kendo.data.DataSource.create({ data: DataSources._Ranges }),
template: "${Name}"
});