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
Показать файл Открыть проект

Открытые методы

Метод Описание
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 )