Missing frozen columns when refreshing hidden grid

4 posts, 0 answers
  1. Josh
    Josh avatar
    7 posts
    Member since:
    Oct 2014

    Posted 24 Aug 2018 Link to this post

    I have a tab strip where the content of each tab contains a grid. When a user performs an action I need to refresh the grid on the selected tab as well as the grids in the tabs that are not selected. The problem that I have is that the grid in one of the tabs has columns that are frozen. When this tab is not selected and the grid is refreshed, the locked columns do not get displayed. All of the other grids in the tabs that are not selected get displayed correctly.

     

    Link to dojo: https://dojo.telerik.com/@jedvalson/asexEDOv with instructions to reproduce the issue

  2. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 28 Aug 2018 Link to this post

    Hello Josh,

    The reason for this behavior comes from the fact that the Grid is inside a hidden container. More information about this is available here:
    Also, you could check this how-to article:
    However, in this case, the grid is already initialized. Thus, I would suggest the usage of the refresh method:
    For example, check the modified Dojo:
    I hope this is useful.


    Regards,
    Preslav
    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.
  3. Josh
    Josh avatar
    7 posts
    Member since:
    Oct 2014

    Posted 28 Aug 2018 in reply to Preslav Link to this post

    Hello Preslav,

    Thank you for looking into this issue. I was aware that there were some eccentricities when loading kendo controls in hidden containers. However, my grid is initialized in a hidden container and it displays fine. I would expect it to work the same when I called the read method a second time. 

    The work around that I came up with is identical to the example in the Dojo that you provided with the exception that I used the Show event of the TabStrip. I was hoping for a solution that didn't require hooking into a TabStrip event, but if this is what you would suggest I will keep it.

    Thanks,

    Josh

     

  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2499 posts

    Posted 30 Aug 2018 Link to this post

    Hi Josh,

    This is necessary in order for the Grid to adjust its layout correctly. Using the show event should also work as it is raised when the tab is made visible. The difference with activate is that show is invoked before the animation has finished.


    Regards,
    Viktor Tachev
    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.
Back to Top