code/panels/DashboardGridFieldPanel.php
public function getGridFieldsFor(SiteTree $page) {
		$grids = array ();
		if(!$page || !$page->exists()) return $grids;

		foreach($page->getCMSFields()->dataFields() as $field) {
			if($field instanceof GridField) {
				$grids[$field->getName()] = $field->Title();
			}
		}
		if(empty($grids)) {
			return array(
				'' => _t('Dashboard.NOGRIDFIELDS','There are no GridFields defined for that page.')
			);
		}
		return $grids;
	}
public function getGridFieldsFor(SiteTree $page) {
		$grids = array ();
		if(!$page || !$page->exists()) return $grids;

		foreach($page->getCMSFields()->dataFields() as $field) {
			if($field instanceof GridField) {
				$grids[$field->getName()] = $field->Title();
			}
		}
		if(empty($grids)) {
			return array(
				'' => _t('Dashboard.NOGRIDFIELDS','There are no GridFields defined for that page.')
			);
		}
		return $grids;
	}
Gets the GridFields for a given page

@param SiteTree A given page
@return array