This is a migrated thread and some comments may be shown as answers.

Page size on grids pager shows numbers instead of 'all' after filtering

2 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jessica
Top achievements
Rank 1
Jessica asked on 18 Nov 2019, 04:40 PM
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");

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 20 Nov 2019, 02:20 PM

Hello Jessica,

Thank you for the provided screenshots and code. Unfortunately I was not able to reproduce the issue based on the shared information. Could you please modify this Dojo example, based on the provided code snippet, to reproduce the issue you are experiencing? The steps I did when trying to replicate the problem was to switch to "All", filter a column and then clear the filter. Am I missing something?

I am looking forward to your reply.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jessica
Top achievements
Rank 1
answered on 20 Nov 2019, 05:54 PM

I couldn't reproduce my error in the dojo so I tracked my code to see where exactly the page size changes from all to a number and it looks like it changes while in the kendo.all.min.js. I used the script link from your dojo and it works fine now, I'm not sure what was wrong with mine, though it seems like it might have just been a different version since the filter icons and a few other things changed with the new script. Thanks so much for your help!

Tags
Grid
Asked by
Jessica
Top achievements
Rank 1
Answers by
Martin
Telerik team
Jessica
Top achievements
Rank 1
Share this question
or