Declined
Last Updated: 17 Sep 2021 07:25 by ADMIN
Lynn
Created on: 10 Sep 2021 12:20
Category: Grid
Type: Bug Report
0
pageSizes not shown when grid is hidden and then revealed

Hi,

When the grid is initially hidden and then revealed programmatically, the pageSizes (and several other elements) are not rendered.

Reproducer:

  1.  Go to https://dojo.telerik.com/EBugiKAZ
  2. Press Run and click the button, see no pageSizes and no "1 - 1 of 4 items" text
  3. Resize the browser window and see the elements appear (requires a minimum size, seems responsive related)

This also breaks when you have grid in a hidden div that you toggle open and it breaks in both Chrome and Firefox

1 comment
ADMIN
Nikolay
Posted on: 17 Sep 2021 07:25

Hello Lynn,

Thank you for sharing the Dojo with me.

If you initialize a Grid inside a hidden container, the Grid may not adjust its layout correctly. Upon resizing, however, the Grid refreshes and adjusts the layout. 

Possible solutions to this include:

  • Delay the initialization of the Grid or change the order in which various Kendo UI widgets are initialized so that the Grid is initialized after its element becomes visible.
  • Execute the resize method of the Grid after the widget becomes visible.

 kendo.resize($("#grid"));

More information you can find in the following documentation article:

https://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance/hidden-containers

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.