public function setDataSource($source)
	{
		$this->dataModel = new DataModel($source, $this->primary_key);

		$this->dataModel->onBeforeFilter[] = [$this, 'beforeDataModelFilter'];
		$this->dataModel->onAfterFilter[] = [$this, 'afterDataModelFilter'];
		$this->dataModel->onAfterPaginated[] = [$this, 'afterDataModelPaginated'];

		return $this;
	}
public function setDataSource($source)
	{
		$this->dataModel = new DataModel($source, $this->primary_key);

		$this->dataModel->onBeforeFilter[] = [$this, 'beforeDataModelFilter'];
		$this->dataModel->onAfterFilter[] = [$this, 'afterDataModelFilter'];
		$this->dataModel->onAfterPaginated[] = [$this, 'afterDataModelPaginated'];

		return $this;
	}
public function setDataSource ( $ source ) { $ this -> dataModel = new DataModel ( $ source , $ this -> primary_key ) ; $ this -> dataModel -> onBeforeFilter [ ] = [ $ this , 'beforeDataModelFilter' ] ; $ this -> dataModel -> onAfterFilter [ ] = [ $ this , 'afterDataModelFilter' ] ; $ this -> dataModel -> onAfterPaginated [ ] = [ $ this , 'afterDataModelPaginated' ] ; return $ this ; }
Set Grid data source
@param DataSource\IDataSource|array|\DibiFluent|\Dibi\Fluent|Nette\Database\Table\Selection|\Doctrine\ORM\QueryBuilder|\Nextras\Orm\Collection\ICollection $source
@return static
Set Grid data source