code: function(activeHd, toIdx) {
          var me         = this,
              normalGrid = me.normalGrid,
              lockedGrid = me.lockedGrid,
              normalHCt  = normalGrid.headerCt,
              lockedHCt  = lockedGrid.headerCt,
              refreshFlags,
              ownerCt;
  
          activeHd = activeHd || normalHCt.getMenu().activeHeader;
          ownerCt = activeHd.ownerCt;
  
          // if column was previously flexed, get/set current width
          // and remove the flex
          if (activeHd.flex) {
              activeHd.width = activeHd.getWidth();
              delete activeHd.flex;
          }
  
          Ext.suspendLayouts();
          ownerCt.remove(activeHd, false);
          activeHd.locked = true;
  
          // Flag to the locked column add listener to do nothing
          me.ignoreAddLockedColumn = true;
          if (Ext.isDefined(toIdx)) {
              lockedHCt.insert(toIdx, activeHd);
          } else {
              lockedHCt.add(activeHd);
          }
          me.ignoreAddLockedColumn = false;
  
          refreshFlags = me.syncLockedWidth();
          if (refreshFlags[0]) {
              lockedGrid.getView().refresh();
          }
          if (refreshFlags[1]) {
              normalGrid.getView().refresh();
          }
          Ext.resumeLayouts(true);
  
          me.fireEvent('lockcolumn', me, activeHd);
      }
docs: going from unlocked section to locked 
  Locks the activeHeader as determined by which menu is open OR a header
  as specified.
  @param {Ext.grid.column.Column} [header] Header to unlock from the locked section.
  Defaults to the header which has the menu open currently.
  @param {Number} [toIdx] The index to move the unlocked header to.
  Defaults to appending as the last item.
  @private