|
Class TTemplateColumn
TTemplateColumn class
TTemplateColumn customizes the layout of controls in the column with
templates. In particular, you can specify setItemTemplate ItemTemplate,
setEditItemTemplate EditItemTemplate, setHeaderTemplate
HeaderTemplate and setFooterTemplate FooterTemplate to customize
specific type of cells in the column.
Since v3.1.0, TTemplateColumn has introduced two new properties setItemRenderer ItemRenderer and 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 TRepeater and TDataList .
When a renderer and a template are both defined for a type of item, the
former takes precedence.
-
TComponent
-
TApplicationComponent
-
TDataGridColumn
-
TTemplateColumn
Methods summary
public
string
|
#
getItemRenderer( )
Returns
string the class name for the item cell renderer. Defaults to empty, meaning not set.
Since
3.1.0
|
public
|
#
setItemRenderer( string $value )
Sets the item cell renderer class.
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.
Parameters
- $value
string the renderer class name in namespace format.
Since
3.1.0
|
public
string
|
#
getEditItemRenderer( )
Returns
string the class name for the edit item cell renderer. Defaults to empty, meaning not
set.
Since
3.1.0
|
public
|
#
setEditItemRenderer( string $value )
Sets the edit item cell renderer class.
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.
Parameters
- $value
string the renderer class name in namespace format.
Since
3.1.0
|
public
ITemplate
|
|
public
|
|
public
ITemplate
|
|
public
|
|
public
|
#
initializeCell( TTableCell $cell, integer $columnIndex, string $itemType )
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).
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).
Parameters
- $cell
TTableCell
the cell to be initialized.
- $columnIndex
integer the index to the Columns property that the cell resides in.
- $itemType
string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
Overrides
|
public
|
#
dataBindColumn( mixed $sender, mixed $param )
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.
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.
|
Methods inherited from TDataGridColumn
formatDataValue(),
getAllowSorting(),
getDataFieldValue(),
getEnableCellGrouping(),
getFooterRenderer(),
getFooterStyle(),
getFooterText(),
getHeaderImageUrl(),
getHeaderRenderer(),
getHeaderStyle(),
getHeaderText(),
getID(),
getItemStyle(),
getOwner(),
getSortExpression(),
getViewState(),
getVisible(),
initialize(),
initializeFooterCell(),
initializeHeaderCell(),
loadState(),
saveState(),
setEnableCellGrouping(),
setFooterRenderer(),
setFooterText(),
setHeaderImageUrl(),
setHeaderRenderer(),
setHeaderText(),
setID(),
setOwner(),
setSortExpression(),
setViewState(),
setVisible()
|
Methods inherited from TComponent
__call(),
__construct(),
__destruct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
addParsedObject(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
|