From 304427074ddf629fd2708b23a3fe0cd0122c05a8 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 27 Aug 2006 14:45:57 +0000 Subject: Cells in TDataGrid rows can now be accessed via the corresponding column IDs. Input controls in some datagrid columns can now be accessed in a named fashion. --- framework/Web/UI/WebControls/THyperLinkColumn.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'framework/Web/UI/WebControls/THyperLinkColumn.php') diff --git a/framework/Web/UI/WebControls/THyperLinkColumn.php b/framework/Web/UI/WebControls/THyperLinkColumn.php index 9fc1e3d2..b8dbb607 100644 --- a/framework/Web/UI/WebControls/THyperLinkColumn.php +++ b/framework/Web/UI/WebControls/THyperLinkColumn.php @@ -36,6 +36,14 @@ Prado::using('System.Web.UI.WebControls.THyperLink'); * The same rule applies to {@link setNavigateUrl NavigateUrl} and * {@link setDataNavigateUrlField DataNavigateUrlField} properties. * + * The hyperlinks in the column can be accessed by one of the following two methods: + * + * $datagridItem->HyperLinkColumnID->HyperLink + * $datagridItem->HyperLinkColumnID->Controls[0] + * + * The second method is possible because the hyperlink control created within the + * datagrid cell is the first child. + * * @author Qiang Xue * @version $Revision: $ $Date: $ * @package System.Web.UI.WebControls @@ -178,6 +186,7 @@ class THyperLinkColumn extends TDataGridColumn if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='') $link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); $cell->getControls()->add($link); + $cell->registerObject('HyperLink',$link); } } -- cgit v1.2.3