My code below does not populate the fields in the grid. I get an empty grid with headers only.
Fiddler shows that the read is executed and returning results. Any ideas?
$("#pageresultGrid").kendoGrid({
dataSource: {
type: "odata",
schema: {
model: {
fields: {
DRG: { type: "string" },
DRGDescription: { type: "string" },
}
},
errors: function (response) {
return response.errors;
},
data: function (response) {
return response["value"];
}
},
transport: {
read: {
url: ksWebApiSearchUrl,
dataType: "jsonp"
}
}
},
pageable: {
numeric: true,
refresh: true,
pageSize: 5,
previousNext: true,
input: false,
info: false,
messages: {
display: "Viewing {0} - {1} of {2}",
empty: "No items to display",
page: "Page",
of: "of {0}",
itemsPerPage: "items per page",
first: "Go to the first page",
previous: "Go to the previous page",
next: "Go to the next page",
last: "Go to the last page",
refresh: "Refresh"
}
},
sortable: true,
columns: [
{
headerTemplate: '<input type="checkbox" id="checkAll">',
template: '<input type="checkbox" value="1" id="results-select-row1"><label class="visuallyhidden" for="results-select-row1">Select Row</label>',
width: 40
},
{
field: "DRG",
headerAttributes: {
"class": "ks-gridheader"
},
template: '<a href="javascript:GetTabDetail(#=DRG#)">#=DRG#</a>',
width: 60,
title: "DRG"
},
{
field: "DRGDescription",
headerAttributes: {
"class": "ks-gridheader"
},
width: 130,
title: "DRG Description"
}
]
});
Fiddler shows that the read is executed and returning results. Any ideas?
$("#pageresultGrid").kendoGrid({
dataSource: {
type: "odata",
schema: {
model: {
fields: {
DRG: { type: "string" },
DRGDescription: { type: "string" },
}
},
errors: function (response) {
return response.errors;
},
data: function (response) {
return response["value"];
}
},
transport: {
read: {
url: ksWebApiSearchUrl,
dataType: "jsonp"
}
}
},
pageable: {
numeric: true,
refresh: true,
pageSize: 5,
previousNext: true,
input: false,
info: false,
messages: {
display: "Viewing {0} - {1} of {2}",
empty: "No items to display",
page: "Page",
of: "of {0}",
itemsPerPage: "items per page",
first: "Go to the first page",
previous: "Go to the previous page",
next: "Go to the next page",
last: "Go to the last page",
refresh: "Refresh"
}
},
sortable: true,
columns: [
{
headerTemplate: '<input type="checkbox" id="checkAll">',
template: '<input type="checkbox" value="1" id="results-select-row1"><label class="visuallyhidden" for="results-select-row1">Select Row</label>',
width: 40
},
{
field: "DRG",
headerAttributes: {
"class": "ks-gridheader"
},
template: '<a href="javascript:GetTabDetail(#=DRG#)">#=DRG#</a>',
width: 60,
title: "DRG"
},
{
field: "DRGDescription",
headerAttributes: {
"class": "ks-gridheader"
},
width: 130,
title: "DRG Description"
}
]
});