Grid/Export/Export.php
protected function getGridData($grid)
    {
        $result = [];

        $this->grid = $grid;

        if ($this->grid->isTitleSectionVisible()) {
            $result['titles'] = $this->getGridTitles();
        }

        $result['rows'] = $this->getGridRows();

        return $result;
    }
protected function getGridData($grid)
    {
        $result = [];

        $this->grid = $grid;

        if ($this->grid->isTitleSectionVisible()) {
            $result['titles'] = $this->getGridTitles();
        }

        $result['rows'] = $this->getGridRows();

        return $result;
    }
Get data form the grid.

@param Grid $grid

@return array

array(
'titles' => array(
'column_id_1' => 'column_title_1',
'column_id_2' => 'column_title_2'
),
'rows' =>array(
array(
'column_id_1' => 'cell_value_1_1',
'column_id_2' => 'cell_value_1_2'
),
array(
'column_id_1' => 'cell_value_2_1',
'column_id_2' => 'cell_value_2_2'
)
)
)