Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
IDataSource
IItemDataRenderer
IRepeatInfoUser
TActiveFileUpload
TBaseDataList
TBaseValidator
TBoundColumn
TBulletedList
TBulletedListDisplayMode
TBulletedListEventParameter
TBulletStyle
TButton
TButtonColumn
TButtonColumnType
TButtonType
TCaptcha
TCaptchaValidator
TCheckBox
TCheckBoxColumn
TCheckBoxList
TCircleHotSpot
TClientScript
TClientScriptLoader
TClientSideValidationSummaryOptions
TColorPicker
TColorPickerClientSide
TColorPickerMode
TCompareValidator
TCompleteWizardStep
TConditional
TContent
TContentDirection
TContentPlaceHolder
TCustomValidator
TDataBoundControl
TDataGrid
TDataGridColumn
TDataGridColumnCollection
TDataGridCommandEventParameter
TDataGridItem
TDataGridItemCollection
TDataGridItemEventParameter
TDataGridItemRenderer
TDataGridPageChangedEventParameter
TDataGridPager
TDataGridPagerButtonType
TDataGridPagerEventParameter
TDataGridPagerMode
TDataGridPagerPosition
TDataGridPagerStyle
TDataGridSortCommandEventParameter
TDataList
TDataListCommandEventParameter
TDataListItem
TDataListItemCollection
TDataListItemEventParameter
TDataListItemRenderer
TDataRenderer
TDataSourceControl
TDataSourceSelectParameters
TDataSourceView
TDataTypeValidator
TDatePicker
TDatePickerClientScript
TDatePickerInputMode
TDatePickerMode
TDatePickerPositionMode
TDisplayStyle
TDraggable
TDropContainer
TDropDownList
TDropDownListColumn
TEditCommandColumn
TEmailAddressValidator
TExpression
TFileUpload
TFont
THiddenField
THorizontalAlign
THotSpot
THotSpotCollection
THotSpotMode
THtmlArea
THtmlElement
THyperLink
THyperLinkColumn
TImage
TImageButton
TImageClickEventParameter
TImageMap
TImageMapEventParameter
TInlineFrame
TInlineFrameAlign
TInlineFrameScrollBars
TItemDataRenderer
TJavascriptLogger
TKeyboard
TLabel
TLinkButton
TListBox
TListControl
TListControlValidator
TListItem
TListItemCollection
TListItemType
TListSelectionMode
TLiteral
TLiteralColumn
TMarkdown
TMetaTag
TMetaTagCollection
TMultiView
TOutputCache
TOutputCacheCalculateKeyEventParameter
TOutputCacheCheckDependencyEventParameter
TPager
TPagerButtonType
TPagerMode
TPagerPageChangedEventParameter
TPanel
TPanelStyle
TPlaceHolder
TPolygonHotSpot
TRadioButton
TRadioButtonList
TRangeValidationDataType
TRangeValidator
TRatingList
TReadOnlyDataSource
TReadOnlyDataSourceView
TRectangleHotSpot
TRegularExpressionValidator
TRepeatDirection
TRepeater
TRepeaterCommandEventParameter
TRepeaterItem
TRepeaterItemCollection
TRepeaterItemEventParameter
TRepeaterItemRenderer
TRepeatInfo
TRepeatLayout
TRequiredFieldValidator
TSafeHtml
TScrollBars
TServerValidateEventParameter
TSlider
TSliderClientScript
TSliderDirection
TStatements
TStyle
TStyleSheet
TTable
TTableCaptionAlign
TTableCell
TTableCellCollection
TTableFooterRow
TTableGridLines
TTableHeaderCell
TTableHeaderRow
TTableHeaderScope
TTableItemStyle
TTableRow
TTableRowCollection
TTableRowSection
TTableStyle
TTabPanel
TTabView
TTabViewCollection
TTemplateColumn
TTemplatedWizardStep
TTextAlign
TTextBox
TTextBoxAutoCompleteType
TTextBoxMode
TTextHighlighter
TTextHighlighterLineNumberStyle
TValidationCompareOperator
TValidationDataType
TValidationSummary
TValidationSummaryDisplayMode
TValidationSummaryDisplayStyle
TValidatorClientSide
TValidatorDisplayStyle
TVerticalAlign
TView
TViewCollection
TWebControl
TWebControlAdapter
TWizard
TWizardFinishNavigationTemplate
TWizardNavigationButtonStyle
TWizardNavigationButtonType
TWizardNavigationContainer
TWizardNavigationEventParameter
TWizardNavigationTemplate
TWizardSideBarListItemTemplate
TWizardSideBarTemplate
TWizardStartNavigationTemplate
TWizardStep
TWizardStepCollection
TWizardStepNavigationTemplate
TWizardStepType
TXmlTransform
Keyword

Class TEditCommandColumn

TComponent
   |
   --TApplicationComponent
      |
      --TDataGridColumn
         |
         --TEditCommandColumn

TEditCommandColumn class

TEditCommandColumn contains the Edit command buttons for editing data items in each row.

TEditCommandColumn will create an edit button if a cell is not in edit mode. Otherwise an update button and a cancel button will be created within the cell. The button captions are specified using EditText, UpdateText, and CancelText.

The buttons in the column can be set to display as hyperlinks, push or image buttons by setting the ButtonType property.

When an edit button is clicked, the datagrid will generate an onEditCommand event. When an update/cancel button is clicked, the datagrid will generate an onUpdateCommand or an onCancelCommand You can write these event handlers to change the state of specific datagrid item.

The CausesValidation and ValidationGroup properties affect the corresponding properties of the edit and update buttons. The cancel button does not cause validation by default.

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

  1. $datagridItem->ButtonColumnID->EditButton (or UpdateButton, CancelButton)
  2. $datagridItem->ButtonColumnID->Controls[0]
The second method is possible because the button control created within the datagrid cell is the first child.

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>

Method Summary
protected  mixed
createButton ( string $commandName, string $text, boolean $causesValidation, string $validationGroup)
Creates a button and initializes its properties.
TButtonColumnType
string
string
boolean
string
string
string
string
string
void
initializeCell ( TTableCell $cell, integer $columnIndex, string $itemType)
Initializes the specified cell to its initial values.
void
void
setCancelImageUrl ( string $value)
void
setCancelText ( string $value)
void
setCausesValidation ( boolean $value)
void
setEditImageUrl ( string $value)
void
setEditText ( string $value)
void
setUpdateImageUrl ( string $value)
void
setUpdateText ( string $value)
void
setValidationGroup ( string $value)
Methods Inherited From TDataGridColumn
TDataGridColumn::formatDataValue(), TDataGridColumn::getAllowSorting(), TDataGridColumn::getDataFieldValue(), TDataGridColumn::getEnableCellGrouping(), TDataGridColumn::getFooterRenderer(), TDataGridColumn::getFooterStyle(), TDataGridColumn::getFooterText(), TDataGridColumn::getHeaderImageUrl(), TDataGridColumn::getHeaderRenderer(), TDataGridColumn::getHeaderStyle(), TDataGridColumn::getHeaderText(), TDataGridColumn::getID(), TDataGridColumn::getItemStyle(), TDataGridColumn::getOwner(), TDataGridColumn::getSortExpression(), TDataGridColumn::getViewState(), TDataGridColumn::getVisible(), TDataGridColumn::initialize(), TDataGridColumn::initializeCell(), TDataGridColumn::initializeFooterCell(), TDataGridColumn::initializeHeaderCell(), TDataGridColumn::loadState(), TDataGridColumn::saveState(), TDataGridColumn::setEnableCellGrouping(), TDataGridColumn::setFooterRenderer(), TDataGridColumn::setFooterText(), TDataGridColumn::setHeaderImageUrl(), TDataGridColumn::setHeaderRenderer(), TDataGridColumn::setHeaderText(), TDataGridColumn::setID(), TDataGridColumn::setOwner(), TDataGridColumn::setSortExpression(), TDataGridColumn::setViewState(), TDataGridColumn::setVisible()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Method Details

createButton

protected mixed createButton (string $commandName , string $text , boolean $causesValidation , string $validationGroup )

Creates a button and initializes its properties.

The button type is determined by ButtonType.

Input
string$commandNamecommand name associated with the button
string$textbutton caption
boolean$causesValidationwhether the button should cause validation
string$validationGroupthe validation group that the button belongs to
Output
mixed the newly created button.
Exception

getButtonType

public TButtonColumnType getButtonType ()

Output
TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.
Exception

getCancelImageUrl

public string getCancelImageUrl ()

Output
string the URL of the image file for cancel image buttons
Exception

getCancelText

public string getCancelText ()

Output
string the caption of the cancel button. Defaults to 'Cancel'.
Exception

getCausesValidation

public boolean getCausesValidation ()

Output
boolean whether postback event trigger by edit or update button will cause input validation, default is true
Exception

getEditImageUrl

public string getEditImageUrl ()

Output
string the URL of the image file for edit image buttons
Exception

getEditText

public string getEditText ()

Output
string the caption of the edit button. Defaults to 'Edit'.
Exception

getUpdateImageUrl

public string getUpdateImageUrl ()

Output
string the URL of the image file for update image buttons
Exception

getUpdateText

public string getUpdateText ()

Output
string the caption of the update button. Defaults to 'Update'.
Exception

getValidationGroup

public string getValidationGroup ()

Output
string the group of validators which the edit or update button causes validation upon postback
Exception

initializeCell

public void initializeCell (TTableCell $cell , integer $columnIndex , string $itemType )

Initializes the specified cell to its initial values.

This method overrides the parent implementation. It creates an update and a cancel button for cell in edit mode. Otherwise it creates an edit button.

Input
TTableCell$cellthe cell to be initialized.
integer$columnIndexthe index to the Columns property that the cell resides in.
string$itemTypethe type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
Output
Exception

setButtonType

public void setButtonType (TButtonColumnType $value )

Input
TButtonColumnType$valuethe type of command button.
Output
Exception

setCancelImageUrl

public void setCancelImageUrl (string $value )

Input
string$valuethe URL of the image file for cancel image buttons
Output
Exception

setCancelText

public void setCancelText (string $value )

Input
string$valuethe caption of the cancel button
Output
Exception

setCausesValidation

public void setCausesValidation (boolean $value )

Input
boolean$valuewhether postback event trigger by edit or update button will cause input validation
Output
Exception

setEditImageUrl

public void setEditImageUrl (string $value )

Input
string$valuethe URL of the image file for edit image buttons
Output
Exception

setEditText

public void setEditText (string $value )

Input
string$valuethe caption of the edit button
Output
Exception

setUpdateImageUrl

public void setUpdateImageUrl (string $value )

Input
string$valuethe URL of the image file for update image buttons
Output
Exception

setUpdateText

public void setUpdateText (string $value )

Input
string$valuethe caption of the update button
Output
Exception

setValidationGroup

public void setValidationGroup (string $value )

Input
string$valuethe group of validators which the edit or update button causes validation upon postback
Output
Exception