Last Updated: 17 Sep 2021 11:43 by ADMIN
Created on: 10 Dec 2014 02:23
Category: Grid
Type: Feature Request
Allow us to show and hide columns in Kendo when the grid isn't visible
This may be more of a bug, but Kendo does not allow you to call showColumn() or hideColumn() when the grid itself is not visible. If you look in the showColumn / hideColumn methods in kendo.grid.js, we can see that there is a .filter(":visible") on the columns in place. Unfortunately for us, our Kendo grid isn't always visible (it can be collapsed: think $.slideUp). Instead, we get an error saying (on the following line) that "style" could not be set on undefined - because our hidden grid's hidden column header doesn't pass the :visible filter.

1 comment
Telerik Admin
Posted on: 10 Dec 2014 14:10
Thanks for the proposal.

For your specific scenario (show/hide columns for a hidden grid) you may consider instead of hiding the grid to position it statically outside of the viewable screen area. Thus the methods should work as expected and at the same time the end user won't be able to see the grid.