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

SharePoint 2013 list datasource

1 Answer 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jordan
Top achievements
Rank 1
Jordan asked on 10 Jul 2014, 08:08 PM
I am having trouble figuring out how to format my datasource for a sharepoint 2013 list using it's vanilla web service.  I am simply trying to read, nothing else, but something just isn't clicking correctly.  Here is what I have:

‚Äč<script>
var listServiceURL = "http://devsite/_api/web/lists('<List GUID>')/items";

var datasource = new kendo.data.DataSource({
type: "odata",
transport: {
read: {
url: listServiceURL,
type: "GET",
dataType: "json",
contentType: "application/json;odata=verbose",
headers: {
"accept": "application/json;odata=verbose"
}
}
},
schema: {
data: "d.results",
model: {
id: "ID",
fields: {
ID: { editable: false, nullable: false },
Title: { validation: { required: true } },
}
}
},
pageSize: 20,
});

$(document).ready(function () {
$("[id$=companyGrid]").kendoGrid({
dataSource: datasource
});
});
</script>

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 Jul 2014, 10:12 AM
Hello  Jordan,

We are not sure what exactly is going wrong, could you please share with us a Live URL which we can visit and see the issue in action? So we can see exactly what the format of the response is and compare it to your schema?

If not please give details for the request/response messages captures with Dev Tools of your browser or with tools such as Fiddler.

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Jordan
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or