Hi,
I can't change pages in my grid. I followed the instructions and I looked for a solution in the forum without success.
When the page is loaded, I can see the grid with the data but I can't see the page numbers below.
No error appears in the console until I press the key to go to the next page. When I click next I get the following error:
Uncaught TypeError: undefined is not a function
kendo.dataviz.min.js:12
dt.extend.success kendo.dataviz.min.js:12
proxy jquery-2.0.3.js:731
n.success kendo.web.min.js:11
fire jquery-2.0.3.js:2913
self.fireWith jquery-2.0.3.js:3025
done jquery-2.0.3.js:7400(anonymous function)
When I loaded the page it request the followed data to Odata service (see the FirstRequest.txt attachment)
After click the next button the request is in the second attachment, and it seems it forget the filter parameter.
this is my code:
$(document).ready(function () {
$('#Messages').kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "/Services/PerseoDataService.svc/JobMessages()",
dataType: "json"
},
schema: {
data: function (data) {
if (data.value) {
return data.value;
}
delete data["odata.metadata"];
return [data];
},
total: function (data) {
return data['odata.count'];
},
model: {
fields: {
Code : {type: "int"},
Date: { type: "date" },
Priority: { type: "int" },
Severity: { type: "string" },
Message: { type: "string" },
}
}
},
filter: { field: "JobKey", operator: "eq", value: "@Model.ID" },
pageSize: 15,
batch: false,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
sort: { field: "Priority", dir: "asc" }
},
//scrollable: {
// virtual: true
//},
//height: 350,
filterable: true,
sortable: true,
pageable: true,
resizable: true,
groupable: false,
selectable: "row",
columns: [
{ field: "Priority", title: "#", width: 30, filterable: false },
{ field: "Date", title: "Data", width: 90, template: "#= kendo.toString(Date,'HH:mm:ss') #" }, //
{ field: "Severity", title: "Liv", width: 90 },
{ field: "Message", title: "Messaggio", }
],
resize: function() {
// user has finished resizing the window
// var height = 350;
//$(".k-grid-content").height(height);
}
});
$("#details").children().prop('disabled', true);
});
Thank you
Claudio
I can't change pages in my grid. I followed the instructions and I looked for a solution in the forum without success.
When the page is loaded, I can see the grid with the data but I can't see the page numbers below.
No error appears in the console until I press the key to go to the next page. When I click next I get the following error:
Uncaught TypeError: undefined is not a function
kendo.dataviz.min.js:12
dt.extend.success kendo.dataviz.min.js:12
proxy jquery-2.0.3.js:731
n.success kendo.web.min.js:11
fire jquery-2.0.3.js:2913
self.fireWith jquery-2.0.3.js:3025
done jquery-2.0.3.js:7400(anonymous function)
When I loaded the page it request the followed data to Odata service (see the FirstRequest.txt attachment)
After click the next button the request is in the second attachment, and it seems it forget the filter parameter.
this is my code:
$(document).ready(function () {
$('#Messages').kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "/Services/PerseoDataService.svc/JobMessages()",
dataType: "json"
},
schema: {
data: function (data) {
if (data.value) {
return data.value;
}
delete data["odata.metadata"];
return [data];
},
total: function (data) {
return data['odata.count'];
},
model: {
fields: {
Code : {type: "int"},
Date: { type: "date" },
Priority: { type: "int" },
Severity: { type: "string" },
Message: { type: "string" },
}
}
},
filter: { field: "JobKey", operator: "eq", value: "@Model.ID" },
pageSize: 15,
batch: false,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
sort: { field: "Priority", dir: "asc" }
},
//scrollable: {
// virtual: true
//},
//height: 350,
filterable: true,
sortable: true,
pageable: true,
resizable: true,
groupable: false,
selectable: "row",
columns: [
{ field: "Priority", title: "#", width: 30, filterable: false },
{ field: "Date", title: "Data", width: 90, template: "#= kendo.toString(Date,'HH:mm:ss') #" }, //
{ field: "Severity", title: "Liv", width: 90 },
{ field: "Message", title: "Messaggio", }
],
resize: function() {
// user has finished resizing the window
// var height = 350;
//$(".k-grid-content").height(height);
}
});
$("#details").children().prop('disabled', true);
});
Thank you
Claudio