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 TButtonColumn

TButtonColumn class

TButtonColumn contains a user-defined command button, such as Add or Remove, that corresponds with each row in the column.

The caption of the buttons in the column is determined by setText Text and setDataTextField DataTextField properties. If both are present, the latter takes precedence. The setDataTextField DataTextField property refers to the name of the field in datasource whose value will be used as the button caption. If setDataTextFormatString DataTextFormatString is not empty, the value will be formatted before rendering.

The buttons in the column can be set to display as hyperlinks, push buttons or images by setting the setButtonType ButtonType property. The setCommandName CommandName will assign its value to all button's CommandName property. The datagrid will capture the command event where you can write event handlers based on different command names. The buttons' CausesValidation and ValidationGroup property values are determined by the column's corresponding properties.

The buttons in the column can be accessed by one of the following two methods:

$datagridItem->ButtonColumnID->Button
$datagridItem->ButtonColumnID->Controls[0]

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

TComponent
Extended by TApplicationComponent
Extended by TDataGridColumn
Extended by TButtonColumn

Direct known subclasses

TActiveButtonColumn
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/TButtonColumn.php
Methods summary
public string
# getText( )

Returns

string
the text caption of the button
public
# setText( string $value )

Sets the text caption of the button.

Sets the text caption of the button.

Parameters

$value
string
the text caption to be set
public string
# getDataTextField( )

Returns

string
the field name from the data source to bind to the button caption
public
# setDataTextField( string $value )

Parameters

$value
string
the field name from the data source to bind to the button caption
public string
# getDataTextFormatString( )

Returns

string
the formatting string used to control how the button caption will be displayed.
public
# setDataTextFormatString( string $value )

Parameters

$value
string
the formatting string used to control how the button caption will be displayed.
public string
# getImageUrl( )

Returns

string
the URL of the image file for image buttons
public
# setImageUrl( string $value )

Parameters

$value
string
the URL of the image file for image buttons
public string
# getDataImageUrlField( )

Returns

string
the field name from the data source to bind to the button image url
public
# setDataImageUrlField( string $value )

Parameters

$value
string
the field name from the data source to bind to the button image url
public string
# getDataImageUrlFormatString( )

Returns

string
the formatting string used to control how the button image url will be displayed.
public
# setDataImageUrlFormatString( string $value )

Parameters

$value
string
the formatting string used to control how the button image url will be displayed.
public TButtonColumnType
# getButtonType( )

Returns

TButtonColumnType
the type of command button. Defaults to TButtonColumnType::LinkButton.
public
# setButtonType( TButtonColumnType $value )

Parameters

$value
TButtonColumnType
the type of command button
public string
# getCommandName( )

Returns

string
the command name associated with the OnCommand event.
public
# setCommandName( string $value )

Sets the command name associated with the Command event.

Sets the command name associated with the Command event.

Parameters

$value
string
the text caption to be set
public boolean
# getCausesValidation( )

Returns

boolean
whether postback event trigger by this button will cause input validation, default is true
public
# setCausesValidation( boolean $value )

Parameters

$value
boolean
whether postback event trigger by this button will cause input validation
public string
# getValidationGroup( )

Returns

string
the group of validators which the button causes validation upon postback
public
# setValidationGroup( string $value )

Parameters

$value
string
the group of validators which the button causes validation upon postback
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 command button within the cell.

Initializes the specified cell to its initial values. This method overrides the parent implementation. It creates a command button within the cell.

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