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 TBoundColumn

TBoundColumn class

TBoundColumn represents a column that is bound to a field in a data source. The cells in the column will be displayed using the data indexed by setDataField DataField. You can customize the display by setting setDataFormatString DataFormatString.

If setReadOnly ReadOnly is false, TBoundColumn will display cells in edit mode with textboxes. Otherwise, a static text is displayed.

When a datagrid row is in edit mode, the textbox control in the TBoundColumn can be accessed by one of the following two methods:

$datagridItem->BoundColumnID->TextBox
$datagridItem->BoundColumnID->Controls[0]

The second method is possible because the textbox control created within the datagrid cell is the first child.

Since v3.1.0, TBoundColumn 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.

TComponent
Extended by TApplicationComponent
Extended by TDataGridColumn
Extended by TBoundColumn

Direct known subclasses

TActiveBoundColumn
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/TBoundColumn.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 data associated with the datagrid cell during databinding. The data can be either the whole data row or a field of the row if getDataField DataField is not empty. If getDataFormatString DataFormatString is not empty, the data will be formatted first before passing to the renderer.

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 data associated with the datagrid cell during databinding. The data can be either the whole data row or a field of the row if getDataField DataField is not empty. If getDataFormatString DataFormatString is not empty, the data will be formatted first before passing to the renderer.

Parameters

$value
string
the renderer class name in namespace format.

Since

3.1.0
public string
# getDataField( )

Returns

string
the field name from the data source to bind to the column
public
# setDataField( string $value )

Parameters

$value
string
the field name from the data source to bind to the column
public string
# getDataFormatString( )

Returns

string
the formatting string used to control how the bound data will be displayed.
public
# setDataFormatString( string $value )

Parameters

$value
string
the formatting string used to control how the bound data will be displayed.
public boolean
# getReadOnly( )

Returns

boolean
whether the items in the column can be edited. Defaults to false.
public
# setReadOnly( boolean $value )

Parameters

$value
boolean
whether the items in the column can be edited
public
# initializeCell( TTableCell $cell, integer $columnIndex, string $itemType )

Initializes the specified cell to its initial values. This method overrides the parent implementation. It creates a textbox for item in edit mode and the column is not read-only. Otherwise it displays a static text. The caption of the button and the static text are retrieved from the datasource.

Initializes the specified cell to its initial values. This method overrides the parent implementation. It creates a textbox for item in edit mode and the column is not read-only. Otherwise it displays a static text. The caption of the button and the static text are retrieved from the datasource.

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