From 69fa043ebb880ce8164691d81be7f24e972d8639 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 6 Feb 2007 18:02:21 +0000 Subject: updated comments about renderer feature. --- framework/Web/UI/WebControls/TTemplateColumn.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TTemplateColumn.php') diff --git a/framework/Web/UI/WebControls/TTemplateColumn.php b/framework/Web/UI/WebControls/TTemplateColumn.php index fe9674cc..bd3a2acb 100644 --- a/framework/Web/UI/WebControls/TTemplateColumn.php +++ b/framework/Web/UI/WebControls/TTemplateColumn.php @@ -24,8 +24,14 @@ Prado::using('System.Web.UI.WebControls.TDataGridColumn'); * and {@link setFooterTemplate FooterTemplate} to customize specific * type of cells in the column. * - * Note, if {@link setHeaderTemplate HeaderTemplate} is not set, the column - * header will be displayed with {@link setHeaderText HeaderText}. + * Since v3.1.0, TTemplateColumn has introduced two new properties {@link setItemRenderer ItemRenderer} + * and {@link setEditItemRenderer EditItemRenderer} which can be used to specify + * the layout of the datagrid cells in browsing and editing mode. + * A renderer refers to a control class that is to be instantiated as a control. + * For more details, see {@link TRepeater} and {@link TDataList}. + * + * When a renderer and a template are both defined for a type of item, the former + * takes precedence. * * @author Qiang Xue * @version $Id$ @@ -57,6 +63,9 @@ class TTemplateColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cells of the column. * + * If the class implements {@link IDataRenderer}, the Data property + * will be set as the row of the data associated with the datagrid item that this cell resides in. + * * @param string the renderer class name in namespace format. * @since 3.1.0 */ @@ -79,6 +88,9 @@ class TTemplateColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cell that is in edit mode. * + * If the class implements {@link IDataRenderer}, the Data property + * will be set as the row of the data associated with the datagrid item that this cell resides in. + * * @param string the renderer class name in namespace format. * @since 3.1.0 */ -- cgit v1.2.3