/**
  * Optionally render a category row and render its data.  If no category data given, render the rows only
  * @param PKPRequest $request
  * @param GridCategoryRow $categoryRow
  * @return String HTML for all the rows (including category)
  */
 function _renderCategoryInternally(&$request, &$categoryRow, $iterator = null)
 {
     $templateMgr =& TemplateManager::getManager();
     $categoryDataElement =& $categoryRow->getData();
     $rowData =& $this->getCategoryData($categoryDataElement);
     // Render the data rows
     $renderedRows = $this->_renderRowsInternally($request, $rowData);
     $templateMgr->assign_by_ref('rows', $renderedRows);
     $columns =& $this->getColumns();
     $templateMgr->assign('numColumns', count($columns));
     $templateMgr->assign('iterator', $iterator);
     $templateMgr->assign_by_ref('categoryRow', $categoryRow);
     $renderedCategoryRow = $templateMgr->fetch($categoryRow->getTemplate());
     $templateMgr->assign_by_ref('renderedCategoryRow', $renderedCategoryRow);
     return $templateMgr->fetch('controllers/grid/gridBodyPartWithCategory.tpl');
 }