Class \Prado\Web\UI\WebControls\TTemplateColumn
TTemplateColumn customizes the layout of controls in the column with templates. In particular, you can specify \Prado\Web\UI\WebControls\setItemTemplate, \Prado\Web\UI\WebControls\setEditItemTemplate, \Prado\Web\UI\WebControls\setHeaderTemplate and \Prado\Web\UI\WebControls\setFooterTemplate to customize specific type of cells in the column.
Since v3.1.0, TTemplateColumn has introduced two new properties \Prado\Web\UI\WebControls\setItemRenderer and \Prado\Web\UI\WebControls\setEditItemRenderer 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 TRepeater and TDataList.
When a renderer and a template are both defined for a type of item, the former takes precedence.
Class hierarchy
- \Prado\Web\UI\WebControls\TTemplateColumn
- \Prado\Web\UI\WebControls\TDataGridColumn
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
dataBindColumn(mixed $sender, mixed $param) : mixed
Databinds a cell in the column.
This method is invoked when datagrid performs databinding. It populates the content of the cell with the relevant data from data source. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
initializeCell(TTableCell $cell, int $columnIndex, string $itemType) : mixed
Initializes the specified cell to its initial values.
This method overrides the parent implementation. It initializes the cell based on different templates (ItemTemplate, EditItemTemplate, HeaderTemplate, FooterTemplate). |
public
|
setEditItemRenderer(string $value) : mixed
Sets the edit item cell renderer class.
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 IDataRenderer, the Data property will be set as the row of the data associated with the datagrid item that this cell resides in. |
public
|
|
public
|
|
public
|
|
public
|
setItemRenderer(string $value) : mixed
Sets the item cell renderer class.
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 IDataRenderer, the Data property will be set as the row of the data associated with the datagrid item that this cell resides in. |
public
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |