public function getFirstShown()
    {
        $firstShown = $this->getGridPagerState()->firstShown ?: 1;
        // Prevent visiting a page with an offset higher than the total number of items
        if ($firstShown > $this->getTotalRecords()) {
            $this->getGridPagerState()->firstShown = $firstShown = 1;
        }
        return $firstShown;
    }