json - Kendo Grid not Binding to My WCF Service -
Actually, here is an example of my data given by the web service:
< Code> "{{" type ": [[" __type ":" Myadtitium: #MyOproject. "," Format " : 12727}, {"__Type": "MyDatetime: #MyProx "Pdf", "format": "pdf", "id": "0900d60b8714b1d8", "last amodified by": "", "trastodified date": blank, "name": "test file of bob", "size Here is my condo grid code: it loads, calls the service, but there is an error after that:< Code> & lt; div id = "example" class = "k-content">The error I see in Chrome is: Unwanted syntax error: Unexpected token:
However, this error is in reference to the JSN data which comes back and it Everything is on one line so it does not help to find me.
I saw that the data that came back from service is "D" when it starts at the root node. I see other examples of online JSON data are very simple and they did not have this root node. If necessary, we can update the service to return different data. I want to know how to edit my code code to put this stuff on the grid. After that I feel that I can research and do it more.
Do I "D." References in the column declaration required? I think this part is wrong with me.
Thanks for any help!
I see some problems you have specified 'Odata' but your service is not an audacity and point . Then you have set the
data type
as a transport option, which is not it - it's an option oftransport.read
. After all, you have to remove thed
from the field names in the column.Here's how the default configuration should be displayed:
$ ("#grid"). Kendo Grid ({Data: Source: {transport: {read: {url: "http: // localhost: 4567 / services / MYSERVICE.svc / getlist", data type: "json"}}, schema: {data: "name ",": "Line", column: [{field: "name"}, {field: "d"}, page size: 10}, scroll: {virtual: right}, altitude: 250, "Last modified", title: "Last modified"}, {field: "size", title: "file size",}, {field: "last modified", title: "finally modified"}}} );
and a live demo:
Comments
Post a Comment