docs: public void setGridTable(String keyAreaName, Rec gridTable, int index)
      {
          if (index == -1)
              index = m_iNextArrayIndex;  // Next available
          m_iNextArrayIndex = Math.max(m_iNextArrayIndex, index+1);
          if (gridTable == null) if (m_gridScreen != null)
              gridTable = m_gridScreen.getMainRecord();
          if (gridTable != null) if (m_gridScreen != null) if (gridTable != m_gridScreen.getMainRecord())
          {
              if (m_gridScreen.getMainRecord() instanceof QueryRecord)
              {
                  int keyIndex = ((QueryRecord)m_gridScreen.getMainRecord()).setGridFile((Record)gridTable, keyAreaName);    // Sets the key order and gridtable (even if only one file)
                  keyAreaName = gridTable.getKeyArea(keyIndex).getKeyName();
              }
          }
          m_iKeyAreaArray[index] = keyAreaName;
      }