Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageSize is set to total when number of records is less than the page size #4092

Closed
VicTachev opened this issue Mar 16, 2018 · 3 comments
Closed

Comments

@VicTachev
Copy link
Contributor

Bug report

When the Grid has autoBind set to false and the number or returned items is less than the specified page size the Pager sets the total as pageSize.

Reproduction of the problem

Run this dojo - https://dojo.telerik.com/UlOdASiv/7
Click Read button

Current behavior

The page size is set to the total number of items

Expected/desired behavior

The page size should be persisted

Environment

  • Kendo UI version: 2018.1.221
  • jQuery version: 1.12
  • Browser: [all]
@VicTachev
Copy link
Contributor Author

Reported in tickets 1157998, 1156965, 1157741

@MilenaCh MilenaCh added this to the 2018.R2 milestone Mar 19, 2018
@digeomel
Copy link

digeomel commented Jun 1, 2018

Please, is there a workaround for this? Instead of upgrading to the latest version? We are paying customers.

@keyofj
Copy link

keyofj commented Jan 14, 2019

I have a similar problem and using a workaround in an older bug: work around

In my case, it is when the record total is less and you have set the paging selection to "All". It does not persist correctly. Here is a modification I use that may help you: in databound event

var dropdown = $(e.sender.element).find('.k-pager-sizes').find('[data-role="dropdownlist"]').data('kendoDropDownList');
            var dropDownValue = dropdown.text();
            var pageSizes = this.options.pageable.pageSizes;

            if (dropDownValue !== "All") {  // grid sets the value to camelcase
                // check if the value is not one of our options
                if (pageSizes.indexOf(parseInt(dropDownValue)) === -1) {
                    // set it to ALL
                    isAllSelected = true;
                } else {
                    isAllSelected = false;
                }
            } else {
                isAllSelected = true;
            }

            setTimeout(function (e) {
                if (isAllSelected) {
                    dropdown.value("all");  // keep lowercase
                    dropdown.trigger('change');
                }
            });

I am on version 2018.1.117 (upgrade to latest if you can and this may go away)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants