public function renderChunk($rowsNumber)
    {
        /** @var ActiveDataProvider $dataProvider */
        $dataProvider = $this->grid->dataProvider;
        /** @var \yii\db\ActiveQuery $query */
        $query = $dataProvider->query;

        $result = '';
        if ($this->rowNumber === 0) {
            $result .= $this->renderHeader();
        }
        $rowCount = $this->dataReader->getRowCount();
        for ($i = 0; $i < $rowsNumber || $rowsNumber === -1; $i++) {
            $row = $this->dataReader->read();
            if ($row === false) {
                $this->dataReader = null;
                $result .= $this->renderFooter();
                break;
            }
            $models = $query->populate([$row]);

            $result .= $this->renderRow(reset($models), $this->rowNumber++, $rowCount);
        }
        return $result;
    }
public function renderChunk($rowsNumber)
    {
        /** @var ActiveDataProvider $dataProvider */
        $dataProvider = $this->grid->dataProvider;
        /** @var \yii\db\ActiveQuery $query */
        $query = $dataProvider->query;

        $result = '';
        if ($this->rowNumber === 0) {
            $result .= $this->renderHeader();
        }
        $rowCount = $this->dataReader->getRowCount();
        for ($i = 0; $i < $rowsNumber || $rowsNumber === -1; $i++) {
            $row = $this->dataReader->read();
            if ($row === false) {
                $this->dataReader = null;
                $result .= $this->renderFooter();
                break;
            }
            $models = $query->populate([$row]);

            $result .= $this->renderRow(reset($models), $this->rowNumber++, $rowCount);
        }
        return $result;
    }
public function renderChunk ( $ rowsNumber ) { /** @var ActiveDataProvider $dataProvider */ $ dataProvider = $ this -> grid -> dataProvider ; /** @var \yii\db\ActiveQuery $query */ $ query = $ dataProvider -> query ; $ result = '' ; if ( $ this -> rowNumber === 0 ) { $ result .= $ this -> renderHeader ( ) ; } $ rowCount = $ this -> dataReader -> getRowCount ( ) ; for ( $ i = 0 ; $ i < $ rowsNumber || $ rowsNumber === - 1 ; $ i ++ ) { $ row = $ this -> dataReader -> read ( ) ; if ( $ row === false ) { $ this -> dataReader = null ; $ result .= $ this -> renderFooter ( ) ; break ; } $ models = $ query -> populate ( [ $ row ] ) ; $ result .= $ this -> renderRow ( reset ( $ models ) , $ this -> rowNumber ++ , $ rowCount ) ; } return $ result ; }
Renders next batch of rows.
@param integer $rowsNumber set to -1 to render all rows
@return string
Renders next batch of rows .