PHP Класс 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.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TDataGridColumn
Показать файл Открыть проект

Открытые методы

Метод Описание
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 )

Защищенные методы

Метод Описание
createButton ( $commandName, $text, $causesValidation, $validationGroup ) : mixed Creates a button and initializes its properties.

Описание методов

createButton() защищенный Метод

The button type is determined by {@link getButtonType ButtonType}.
protected createButton ( $commandName, $text, $causesValidation, $validationGroup ) : mixed
Результат mixed the newly created button.

getButtonType() публичный Метод

public getButtonType ( ) : TButtonColumnType
Результат TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.

getCancelImageUrl() публичный Метод

public getCancelImageUrl ( ) : string
Результат string the URL of the image file for cancel image buttons

getCancelText() публичный Метод

public getCancelText ( ) : string
Результат string the caption of the cancel button. Defaults to 'Cancel'.

getCausesValidation() публичный Метод

public getCausesValidation ( ) : boolean
Результат boolean whether postback event trigger by edit or update button will cause input validation, default is true

getEditImageUrl() публичный Метод

public getEditImageUrl ( ) : string
Результат string the URL of the image file for edit image buttons

getEditText() публичный Метод

public getEditText ( ) : string
Результат string the caption of the edit button. Defaults to 'Edit'.

getUpdateImageUrl() публичный Метод

public getUpdateImageUrl ( ) : string
Результат string the URL of the image file for update image buttons

getUpdateText() публичный Метод

public getUpdateText ( ) : string
Результат string the caption of the update button. Defaults to 'Update'.

getValidationGroup() публичный Метод

public getValidationGroup ( ) : string
Результат string the group of validators which the edit or update button causes validation upon postback

initializeCell() публичный Метод

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 setButtonType ( $value )

setCancelImageUrl() публичный Метод

public setCancelImageUrl ( $value )

setCancelText() публичный Метод

public setCancelText ( $value )

setCausesValidation() публичный Метод

public setCausesValidation ( $value )

setEditImageUrl() публичный Метод

public setEditImageUrl ( $value )

setEditText() публичный Метод

public setEditText ( $value )

setUpdateImageUrl() публичный Метод

public setUpdateImageUrl ( $value )

setUpdateText() публичный Метод

public setUpdateText ( $value )

setValidationGroup() публичный Метод

public setValidationGroup ( $value )