Hi,
I am trying to show remote data in grid, my dataSource config is like this:
var items= new kendo.data.DataSource({
transport: {
read: {
url: "http://localhost:59515/HTML/Service.svc/Temp",
dataType: "jsonp",
data: {
}
}
},
error: function(e) {
console.log(e);
},
schema:
{
data:"d",
model:
{
fields:
{
Text: {
editable:true, validation: { required:true }
},
Qty: {
editable: true, type:"number", validation: { required:true, min:1 }
},
Val: {
editable:false
}
}
}
}
}
);
Response JSON:
{
"d":
[
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"}
]
}
No data is displayed in the grid, though the error event handler of dataSource is called and the console.log shows following error:
I am trying to show remote data in grid, my dataSource config is like this:
var items= new kendo.data.DataSource({
transport: {
read: {
url: "http://localhost:59515/HTML/Service.svc/Temp",
dataType: "jsonp",
data: {
}
}
},
error: function(e) {
console.log(e);
},
schema:
{
data:"d",
model:
{
fields:
{
Text: {
editable:true, validation: { required:true }
},
Qty: {
editable: true, type:"number", validation: { required:true, min:1 }
},
Val: {
editable:false
}
}
}
}
}
);
Response JSON:
{
"d":
[
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
{"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"}
]
}
No data is displayed in the grid, though the error event handler of dataSource is called and the console.log shows following error: