PHP Class Prado\Web\UI\WebControls\TEditCommandColumn

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 {@link setEditText EditText}, {@link setUpdateText UpdateText}, and {@link setCancelText CancelText}. The buttons in the column can be set to display as hyperlinks, push or image buttons by setting the {@link setButtonType ButtonType} property. When an edit button is clicked, the datagrid will generate an {@link onEditCommand OnEditCommand} event. When an update/cancel button is clicked, the datagrid will generate an {@link onUpdateCommand OnUpdateCommand} or an {@link onCancelCommand OnCancelCommand} You can write these event handlers to change the state of specific datagrid item. The {@link setCausesValidation CausesValidation} and {@link setValidationGroup 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: $datagridItem->ButtonColumnID->EditButton (or UpdateButton, CancelButton) $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 ([email protected])
Inheritance: extends TDataGridColumn
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
getButtonType ( ) : TButtonColumnType
getCancelImageUrl ( ) : string
getCancelText ( ) : string
getCausesValidation ( ) : boolean
getEditImageUrl ( ) : string
getEditText ( ) : string
getUpdateImageUrl ( ) : string
getUpdateText ( ) : string
getValidationGroup ( ) : string
initializeCell ( $cell, $columnIndex, $itemType ) Initializes the specified cell to its initial values.
setButtonType ( $value )
setCancelImageUrl ( $value )
setCancelText ( $value )
setCausesValidation ( $value )
setEditImageUrl ( $value )
setEditText ( $value )
setUpdateImageUrl ( $value )
setUpdateText ( $value )
setValidationGroup ( $value )

Méthodes protégées

Méthode Description
createButton ( $commandName, $text, $causesValidation, $validationGroup ) : mixed Creates a button and initializes its properties.

Method Details

createButton() protected méthode

The button type is determined by {@link getButtonType ButtonType}.
protected createButton ( $commandName, $text, $causesValidation, $validationGroup ) : mixed
Résultat mixed the newly created button.

getButtonType() public méthode

public getButtonType ( ) : TButtonColumnType
Résultat TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.

getCancelImageUrl() public méthode

public getCancelImageUrl ( ) : string
Résultat string the URL of the image file for cancel image buttons

getCancelText() public méthode

public getCancelText ( ) : string
Résultat string the caption of the cancel button. Defaults to 'Cancel'.

getCausesValidation() public méthode

public getCausesValidation ( ) : boolean
Résultat boolean whether postback event trigger by edit or update button will cause input validation, default is true

getEditImageUrl() public méthode

public getEditImageUrl ( ) : string
Résultat string the URL of the image file for edit image buttons

getEditText() public méthode

public getEditText ( ) : string
Résultat string the caption of the edit button. Defaults to 'Edit'.

getUpdateImageUrl() public méthode

public getUpdateImageUrl ( ) : string
Résultat string the URL of the image file for update image buttons

getUpdateText() public méthode

public getUpdateText ( ) : string
Résultat string the caption of the update button. Defaults to 'Update'.

getValidationGroup() public méthode

public getValidationGroup ( ) : string
Résultat string the group of validators which the edit or update button causes validation upon postback

initializeCell() public méthode

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.
public initializeCell ( $cell, $columnIndex, $itemType )

setButtonType() public méthode

public setButtonType ( $value )

setCancelImageUrl() public méthode

public setCancelImageUrl ( $value )

setCancelText() public méthode

public setCancelText ( $value )

setCausesValidation() public méthode

public setCausesValidation ( $value )

setEditImageUrl() public méthode

public setEditImageUrl ( $value )

setEditText() public méthode

public setEditText ( $value )

setUpdateImageUrl() public méthode

public setUpdateImageUrl ( $value )

setUpdateText() public méthode

public setUpdateText ( $value )

setValidationGroup() public méthode

public setValidationGroup ( $value )