PHP 클래스 Prado\Web\UI\WebControls\TButtonColumn

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 {@link setText Text} and {@link setDataTextField DataTextField} properties. If both are present, the latter takes precedence. The {@link setDataTextField DataTextField} property refers to the name of the field in datasource whose value will be used as the button caption. If {@link 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 {@link setButtonType ButtonType} property. The {@link 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.
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends TDataGridColumn
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
dataBindColumn ( $sender, $param ) Databinds a cell in the column.
getButtonType ( ) : TButtonColumnType
getCausesValidation ( ) : boolean
getCommandName ( ) : string
getDataImageUrlField ( ) : string
getDataImageUrlFormatString ( ) : string
getDataTextField ( ) : string
getDataTextFormatString ( ) : string
getImageUrl ( ) : string
getText ( ) : string
getValidationGroup ( ) : string
initializeCell ( $cell, $columnIndex, $itemType ) Initializes the specified cell to its initial values.
setButtonType ( $value )
setCausesValidation ( $value )
setCommandName ( $value ) Sets the command name associated with the Command event.
setDataImageUrlField ( $value )
setDataImageUrlFormatString ( $value )
setDataTextField ( $value )
setDataTextFormatString ( $value )
setImageUrl ( $value )
setText ( $value ) Sets the text caption of the button.
setValidationGroup ( $value )

메소드 상세

dataBindColumn() 공개 메소드

This method is invoked when datagrid performs databinding. It populates the content of the cell with the relevant data from data source.
public dataBindColumn ( $sender, $param )

getButtonType() 공개 메소드

public getButtonType ( ) : TButtonColumnType
리턴 TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.

getCausesValidation() 공개 메소드

public getCausesValidation ( ) : boolean
리턴 boolean whether postback event trigger by this button will cause input validation, default is true

getCommandName() 공개 메소드

public getCommandName ( ) : string
리턴 string the command name associated with the OnCommand event.

getDataImageUrlField() 공개 메소드

public getDataImageUrlField ( ) : string
리턴 string the field name from the data source to bind to the button image url

getDataImageUrlFormatString() 공개 메소드

public getDataImageUrlFormatString ( ) : string
리턴 string the formatting string used to control how the button image url will be displayed.

getDataTextField() 공개 메소드

public getDataTextField ( ) : string
리턴 string the field name from the data source to bind to the button caption

getDataTextFormatString() 공개 메소드

public getDataTextFormatString ( ) : string
리턴 string the formatting string used to control how the button caption will be displayed.

getImageUrl() 공개 메소드

public getImageUrl ( ) : string
리턴 string the URL of the image file for image buttons

getText() 공개 메소드

public getText ( ) : string
리턴 string the text caption of the button

getValidationGroup() 공개 메소드

public getValidationGroup ( ) : string
리턴 string the group of validators which the button causes validation upon postback

initializeCell() 공개 메소드

This method overrides the parent implementation. It creates a command button within the cell.
public initializeCell ( $cell, $columnIndex, $itemType )

setButtonType() 공개 메소드

public setButtonType ( $value )

setCausesValidation() 공개 메소드

public setCausesValidation ( $value )

setCommandName() 공개 메소드

Sets the command name associated with the Command event.
public setCommandName ( $value )

setDataImageUrlField() 공개 메소드

public setDataImageUrlField ( $value )

setDataImageUrlFormatString() 공개 메소드

public setDataImageUrlFormatString ( $value )

setDataTextField() 공개 메소드

public setDataTextField ( $value )

setDataTextFormatString() 공개 메소드

public setDataTextFormatString ( $value )

setImageUrl() 공개 메소드

public setImageUrl ( $value )

setText() 공개 메소드

Sets the text caption of the button.
public setText ( $value )

setValidationGroup() 공개 메소드

public setValidationGroup ( $value )