+ if (!me.owner.hideHeaders) {
+
+ // If this is one HeaderContainer of a pair in a side-by-side locking view, then find the height
+ // of the highest one, and sync the other one to that height.
+ if (owner.lockableInjected) {
+ topGrid = owner.up('tablepanel').up('tablepanel');
+ bothHeaderCts = topGrid.query('headercontainer:not([isHeader])');
+ otherHeaderCt = (bothHeaderCts[0] === owner) ? bothHeaderCts[1] : bothHeaderCts[0];
+
+ // Both sides must be rendered for this syncing operation to work.
+ if (!otherHeaderCt.rendered) {
+ return;
+ }
+
+ // Get the height of the highest of both HeaderContainers
+ otherHeight = otherHeaderCt.layout.getRenderTarget().getViewSize().height;
+ if (!otherHeight) {
+ return;
+ }
+ thisHeight = this.getRenderTarget().getViewSize().height;
+ if (!thisHeight) {
+ return;
+ }
+
+ // Prevent recursion back into here when the "other" grid, after adjusting to the new hight of its headerCt, attempts to inform its ownerCt
+ // Block the upward notification by flagging the top grid's component layout as busy.
+ topGrid.componentLayout.layoutBusy = true;
+
+ // Assume that the correct header height is the height of this HeaderContainer
+ headerHeight = thisHeight;
+
+ // Synch the height of the smaller HeaderContainer to the height of the highest one.
+ if (thisHeight > otherHeight) {
+ otherHeaderCt.layout.align = 'stretch';
+ otherHeaderCt.setCalculatedSize(otherHeaderCt.getWidth(), owner.getHeight(), otherHeaderCt.ownerCt);
+ delete otherHeaderCt.layout.align;
+ modifiedGrid = otherHeaderCt.up('tablepanel');
+ } else if (otherHeight > thisHeight) {
+ headerHeight = otherHeight;
+ this.align = 'stretch';
+ owner.setCalculatedSize(owner.getWidth(), otherHeaderCt.getHeight(), owner.ownerCt);
+ delete this.align;
+ modifiedGrid = owner.up('tablepanel');
+ }
+ topGrid.componentLayout.layoutBusy = false;
+
+ // Gather all Header items across both Grids.
+ items = bothHeaderCts[0].layout.getLayoutItems().concat(bothHeaderCts[1].layout.getLayoutItems());
+ } else {
+ headerHeight = this.getRenderTarget().getViewSize().height;
+ items = me.getLayoutItems();
+ }
+
+ len = items.length;