code/panels/DashboardGridFieldPanel.php
protected function getGrid() {
		if($this->SubjectPage()->exists() && $this->GridFieldName) {
			if($grid = $this->SubjectPage()->getCMSFields()->dataFieldByName($this->GridFieldName)) {
				$grid->setForm($this->Form());
				return $grid;
			}
		}
	}
protected function getGrid() {
		if($this->SubjectPage()->exists() && $this->GridFieldName) {
			if($grid = $this->SubjectPage()->getCMSFields()->dataFieldByName($this->GridFieldName)) {
				$grid->setForm($this->Form());
				return $grid;
			}
		}
	}
Gets the grid field instance given the selected page and GridField name

@return GridField