code: public void preSetupGrid(String strMenu)
      {
          Record record = m_recDetail;
          if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
              record.setKeyArea(record.getDefaultScreenKeyArea());
      }
docs: Code to display a Menu.