Prado\Web\UI\WebControls\TPager::onPreRender PHP Method

onPreRender() public method

This method is invoked by {@link dataBind()}. You may override this function to provide your own way of data population.
public onPreRender ( $param )
    public function onPreRender($param)
    {
        parent::onPreRender($param);
        $controlID = $this->getControlToPaginate();
        if (($targetControl = $this->getNamingContainer()->findControl($controlID)) === null || !$targetControl instanceof TDataBoundControl) {
            throw new TConfigurationException('pager_controltopaginate_invalid', $controlID);
        }
        if ($targetControl->getAllowPaging()) {
            $this->_pageCount = $targetControl->getPageCount();
            $this->getControls()->clear();
            $this->setPageCount($targetControl->getPageCount());
            $this->setCurrentPageIndex($targetControl->getCurrentPageIndex());
            $this->buildPager();
        } else {
            $this->_pageCount = 0;
        }
    }