/** * * I overrode it for making header and body separately * */ public function renderItems() { if (!$this->fixedHeader) { return parent::renderItems(); } $content = array_filter([$this->renderCaption(), $this->renderColumnGroup(), $this->showHeader ? $this->renderTableHeader() : false]); $header = Html::tag('table', implode("\n", $content), $this->tableOptions); $content = array_filter([$this->renderCaption(), $this->renderColumnGroup(), $this->showFooter ? $this->renderTableFooter() : false, $this->renderTableBody()]); $body = Html::tag('table', implode("\n", $content), $this->tableOptions2 ?: $this->tableOptions); return strtr($this->fixedHeaderTemplate, ['{header}' => $header, '{body}' => $body]); }
public function renderItems() { if ($this->filterModel && $this->filterFields) { $view = $this->getView(); $view->beginBlock('__ITEMS__'); $formClass = $this->formClass; $this->_form = $formClass::begin($this->formConfig); echo parent::renderItems(); $formClass::end(); $view->endBlock(); return $view->blocks['__ITEMS__']; } return parent::renderItems(); }
/** * Renders the data models for the grid view. */ public function renderItems() { return '<div class="table-responsive">' . parent::renderItems() . '</div>'; }