Unplanned
Last Updated: 18 Dec 2019 15:55 by ADMIN
Joshua
Created on: 15 Oct 2019 21:19
Category: Grid
Type: Bug Report
1
Kendo Grid client-side paging adds additional nested .k-pager-numbers-wrap DIVs on each setDataSource call

If you configure a Kendo Grid with client-side paging, each time you call setDataSource to update the data source then a new .k-pager-numbers-wrap DIV is added to the page controls. I've replicated the problem in Dojo at https://dojo.telerik.com/UTolOzer by taking a basic client-side paging demo, moving the dataSource configuration into a separate function (with data("kendoGrid").setDataSource), and calling that function 25 times. At the end, the source shows the UL element with the page buttons inside 25 .k-pager-numbers-wrap DIV elements.

I first noticed this problem because in my own environment, each nested DIV was shifting the page buttons left 1 pixel and overlapping the "previous page" buttons. In my Dojo example, with 25 nested DIVs the page buttons disappear completely.

I've added the following in my own code as a workaround in the dataBound event of the grid:

                            var trueParent = e.sender.pager.element.find(".k-pager-numbers-wrap").first();
                            e.sender.pager.element.find("ul").appendTo(trueParent);
                            trueParent.find(".k-pager-numbers-wrap").remove();

 

1 comment
ADMIN
Angel Petrov
Posted on: 22 Oct 2019 15:16

Hello Joshua,

Indeed this seems like a bug. I have already logged it in our repo. You can monitor our progress on the matter from here.

As a token of gratitude for reporting this to us I have updated your account points. For now we suggest to use the workaround which you implemented.

Regards,
Angel Petrov
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.