PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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
Extended by TApplicationComponent
Extended by TDataGridColumn
Extended by TTemplateColumn

Direct known subclasses

TActiveTemplateColumn
Package: System\Web\UI\WebControls
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/WebControls/TTemplateColumn.php
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
# getEditItemTemplate( )

Returns

ITemplate
the edit item template
public
# setEditItemTemplate( ITemplate $value )

Parameters

$value
ITemplate
the edit item template

Throws

TInvalidDataTypeException
if the input is not an ITemplate or not null.
public ITemplate
# getItemTemplate( )

Returns

ITemplate
the item template
public
# setItemTemplate( ITemplate $value )

Parameters

$value
ITemplate
the item template

Throws

TInvalidDataTypeException
if the input is not an ITemplate or not null.
public ITemplate
# getHeaderTemplate( )

Returns

ITemplate
the header template
public
# setHeaderTemplate( ITemplate $value )

Parameters

$value
ITemplate
the header template.

Throws

TInvalidDataTypeException
if the input is not an ITemplate or not null.
public ITemplate
# getFooterTemplate( )

Returns

ITemplate
the footer template
public
# setFooterTemplate( ITemplate $value )

Parameters

$value
ITemplate
the footer template

Throws

TInvalidDataTypeException
if the input is not an ITemplate or not null.
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

TDataGridColumn::initializeCell()
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 TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
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()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO