When a Grid height is specified and the Grid is scrollable, the widget calculates the height of its scrollable data container (div.k-grid-content).
You have two options:
1. Remove the Grid height and define a height style for the div.k-grid-content element via an external CSS rule. In this way there will be no calculations.
2. Calculate the div.k-grid-content height manually in the PanelBar's activate event.
Use parts of the code from this example:
Your real-world scenario is probably somewhat different, as you said it works in some cases and not in others, but the cause of the problem and the possible resolution may be similar.
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI