[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TEditCommandColumn.php (sommaire)

TEditCommandColumn class file

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TEditCommandColumn.php 1397 2006-09-07 07:55:53Z wei $
Poids: 265 lignes (9 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

TEditCommandColumn:: (20 méthodes):
  getButtonType()
  setButtonType()
  getEditText()
  setEditText()
  getEditImageUrl()
  setEditImageUrl()
  getUpdateText()
  setUpdateText()
  getUpdateImageUrl()
  setUpdateImageUrl()
  getCancelText()
  setCancelText()
  getCancelImageUrl()
  setCancelImageUrl()
  getCausesValidation()
  setCausesValidation()
  getValidationGroup()
  setValidationGroup()
  initializeCell()
  createButton()


Classe: TEditCommandColumn  - X-Ref

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 {@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:
<code>
$datagridItem->ButtonColumnID->EditButton (or UpdateButton, CancelButton)
$datagridItem->ButtonColumnID->Controls[0]
</code>
The second method is possible because the button control created within the
datagrid cell is the first child.

getButtonType()   X-Ref

return: TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.

setButtonType($value)   X-Ref

param: TButtonColumnType the type of command button.

getEditText()   X-Ref

return: string the caption of the edit button. Defaults to 'Edit'.

setEditText($value)   X-Ref

param: string the caption of the edit button

getEditImageUrl()   X-Ref

return: string the URL of the image file for edit image buttons

setEditImageUrl($value)   X-Ref

param: string the URL of the image file for edit image buttons

getUpdateText()   X-Ref

return: string the caption of the update button. Defaults to 'Update'.

setUpdateText($value)   X-Ref

param: string the caption of the update button

getUpdateImageUrl()   X-Ref

return: string the URL of the image file for update image buttons

setUpdateImageUrl($value)   X-Ref

param: string the URL of the image file for update image buttons

getCancelText()   X-Ref

return: string the caption of the cancel button. Defaults to 'Cancel'.

setCancelText($value)   X-Ref

param: string the caption of the cancel button

getCancelImageUrl()   X-Ref

return: string the URL of the image file for cancel image buttons

setCancelImageUrl($value)   X-Ref

param: string the URL of the image file for cancel image buttons

getCausesValidation()   X-Ref

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

setCausesValidation($value)   X-Ref

param: boolean whether postback event trigger by edit or update button will cause input validation

getValidationGroup()   X-Ref

return: string the group of validators which the edit or update button causes validation upon postback

setValidationGroup($value)   X-Ref

param: string the group of validators which the edit or update button causes validation upon postback

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

param: TTableCell the cell to be initialized.
param: integer the index to the Columns property that the cell resides in.
param: string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)

createButton($commandName,$text,$causesValidation,$validationGroup)   X-Ref
Creates a button and initializes its properties.
The button type is determined by {@link getButtonType ButtonType}.

param: string command name associated with the button
param: string button caption
param: boolean whether the button should cause validation
param: string the validation group that the button belongs to
return: mixed the newly created button.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7