PHP 클래스 Prado\Web\UI\WebControls\TTemplateColumn

TTemplateColumn customizes the layout of controls in the column with templates. In particular, you can specify {@link setItemTemplate ItemTemplate}, {@link setEditItemTemplate EditItemTemplate}, {@link setHeaderTemplate HeaderTemplate} and {@link setFooterTemplate FooterTemplate} to customize specific type of cells in the column. 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.
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends TDataGridColumn
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
dataBindColumn ( $sender, $param ) Databinds a cell in the column.
getEditItemRenderer ( ) : string
getEditItemTemplate ( ) : Prado\Web\UI\ITemplate
getFooterTemplate ( ) : Prado\Web\UI\ITemplate
getHeaderTemplate ( ) : Prado\Web\UI\ITemplate
getItemRenderer ( ) : string
getItemTemplate ( ) : Prado\Web\UI\ITemplate
initializeCell ( $cell, $columnIndex, $itemType ) Initializes the specified cell to its initial values.
setEditItemRenderer ( $value ) Sets the edit item cell renderer class.
setEditItemTemplate ( $value )
setFooterTemplate ( $value )
setHeaderTemplate ( $value )
setItemRenderer ( $value ) Sets the item cell renderer class.
setItemTemplate ( $value )

메소드 상세

dataBindColumn() 공개 메소드

This method is invoked when datagrid performs databinding. It populates the content of the cell with the relevant data from data source.
public dataBindColumn ( $sender, $param )

getEditItemRenderer() 공개 메소드

부터: 3.1.0
public getEditItemRenderer ( ) : string
리턴 string the class name for the edit item cell renderer. Defaults to empty, meaning not set.

getEditItemTemplate() 공개 메소드

public getEditItemTemplate ( ) : Prado\Web\UI\ITemplate
리턴 Prado\Web\UI\ITemplate the edit item template

getFooterTemplate() 공개 메소드

public getFooterTemplate ( ) : Prado\Web\UI\ITemplate
리턴 Prado\Web\UI\ITemplate the footer template

getHeaderTemplate() 공개 메소드

public getHeaderTemplate ( ) : Prado\Web\UI\ITemplate
리턴 Prado\Web\UI\ITemplate the header template

getItemRenderer() 공개 메소드

부터: 3.1.0
public getItemRenderer ( ) : string
리턴 string the class name for the item cell renderer. Defaults to empty, meaning not set.

getItemTemplate() 공개 메소드

public getItemTemplate ( ) : Prado\Web\UI\ITemplate
리턴 Prado\Web\UI\ITemplate the item template

initializeCell() 공개 메소드

This method overrides the parent implementation. It initializes the cell based on different templates (ItemTemplate, EditItemTemplate, HeaderTemplate, FooterTemplate).
public initializeCell ( $cell, $columnIndex, $itemType )

setEditItemRenderer() 공개 메소드

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 \Prado\IDataRenderer}, the Data property will be set as the row of the data associated with the datagrid item that this cell resides in.
부터: 3.1.0
public setEditItemRenderer ( $value )

setEditItemTemplate() 공개 메소드

public setEditItemTemplate ( $value )

setFooterTemplate() 공개 메소드

public setFooterTemplate ( $value )

setHeaderTemplate() 공개 메소드

public setHeaderTemplate ( $value )

setItemRenderer() 공개 메소드

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 \Prado\IDataRenderer}, the Data property will be set as the row of the data associated with the datagrid item that this cell resides in.
부터: 3.1.0
public setItemRenderer ( $value )

setItemTemplate() 공개 메소드

public setItemTemplate ( $value )