I'm using the pager for my grid and gave it the size options: 5, 10, 20, 50, and 'all'. They all work fine except for when I have the page size set to all and then filter a column, after filtering the page size changes to the number of total items and when I undo the filter it still doesn't show 'all'. Here's my grids code (and I attached some snapshots of the issue):
VVOEventsPropertyTableKendoGrid = $("#VVOEventsTable").kendoGrid({
dataSource: {
type: "signalr",
schema: {
model: {
fields: {
_id: { type: "string" },
EventTime: { type: "date" },
//VVOID: { type: "string" },
OpMode: { type: "string" },
EstimatePowDiff: { type: "string" },
EstimatePowLoss: { type: "string" },
EstimateMinVol: { type: "string" },
ControlStatus: { type: "string" }
}
}
},
},
change: onChangeVVO,
columnMenu: true,
excel: {
allPages: true
},
filterable: { search: true, ignoreCase: true },
pageable: {
pageSize: 5, pageSizes: [5, 10, 20, 50, "All"], input: true, numeric: false, message: {
empty: 'No Data',
allPages: "Show all"
} },
reorderable: true,
resizable: true,
scrollable: true,
selectable: "row",
sortable: true,
height: 320,
columns: [
{
field: "EventTime",
title: "Event Time",
filterable: { multi: true },
width: 70,
template: function (dataItem) {
var split = dataItem.EventTime.split(".");
var time = split[1].split(" ");
return split[0] + " " + time[1];
},
headerAttributes: { style: "white-space: normal" }
},
{
field: "OpMode",
title: "Operation Mode",
filterable: { multi: true },
width: 70,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimatePowDiff",
title: "Estimated Power Difference",
filterable: { multi: true },
width: 60,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimatePowLoss",
title: "Estimated Power Loss Imporovement",
filterable: { multi: true },
width: 80,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimateMinVol",
title: "Estimated Min Voltage Improvement",
filterable: { multi: true },
width: 70,
headerAttributes: { style: "white-space: normal" }
}, {
field: "ControlStatus",
title: "Control Status",
filterable: { multi: true },
width: 60,
headerAttributes: { style: "white-space: normal" }
}],
excelExport: function (e) {
e.preventDefault();
var columns = e.workbook.sheets[0].columns;
columns.forEach(function(column){
delete column.width;
column.autoWidth = true;
});
VVOEventsWorkbook = e.workbook;
promises[0].resolve(e.workbook);
}
}).data("kendoGrid");
VVOEventsPropertyTableKendoGrid = $("#VVOEventsTable").kendoGrid({
dataSource: {
type: "signalr",
schema: {
model: {
fields: {
_id: { type: "string" },
EventTime: { type: "date" },
//VVOID: { type: "string" },
OpMode: { type: "string" },
EstimatePowDiff: { type: "string" },
EstimatePowLoss: { type: "string" },
EstimateMinVol: { type: "string" },
ControlStatus: { type: "string" }
}
}
},
},
change: onChangeVVO,
columnMenu: true,
excel: {
allPages: true
},
filterable: { search: true, ignoreCase: true },
pageable: {
pageSize: 5, pageSizes: [5, 10, 20, 50, "All"], input: true, numeric: false, message: {
empty: 'No Data',
allPages: "Show all"
} },
reorderable: true,
resizable: true,
scrollable: true,
selectable: "row",
sortable: true,
height: 320,
columns: [
{
field: "EventTime",
title: "Event Time",
filterable: { multi: true },
width: 70,
template: function (dataItem) {
var split = dataItem.EventTime.split(".");
var time = split[1].split(" ");
return split[0] + " " + time[1];
},
headerAttributes: { style: "white-space: normal" }
},
{
field: "OpMode",
title: "Operation Mode",
filterable: { multi: true },
width: 70,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimatePowDiff",
title: "Estimated Power Difference",
filterable: { multi: true },
width: 60,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimatePowLoss",
title: "Estimated Power Loss Imporovement",
filterable: { multi: true },
width: 80,
headerAttributes: { style: "white-space: normal" }
}, {
field: "EstimateMinVol",
title: "Estimated Min Voltage Improvement",
filterable: { multi: true },
width: 70,
headerAttributes: { style: "white-space: normal" }
}, {
field: "ControlStatus",
title: "Control Status",
filterable: { multi: true },
width: 60,
headerAttributes: { style: "white-space: normal" }
}],
excelExport: function (e) {
e.preventDefault();
var columns = e.workbook.sheets[0].columns;
columns.forEach(function(column){
delete column.width;
column.autoWidth = true;
});
VVOEventsWorkbook = e.workbook;
promises[0].resolve(e.workbook);
}
}).data("kendoGrid");