TDropDownListColumn class
TDropDownListColumn represents a column that is bound to a field in a data source. The cells in the column will be displayed using the data indexed by DataTextField. You can customize the display by setting DataTextFormatString.
If ReadOnly is false, TDropDownListColumn will display cells in edit mode with dropdown lists. Otherwise, a static text is displayed. The currently selected dropndown list item is specified by the data indexed with DataValueField.
There are two approaches to specify the list items available for selection. The first approach uses template syntax as follows,
The second approach specifies a data source to be bound to the dropdown lists by setting ListDataSource. Like generic list controls, you may also want to specify which data fields are used for item values and texts by setting ListValueField and ListTextField, respectively. Furthermore, the item texts may be formatted by using ListTextFormatString. Note, if you specify ListDataSource, do it before calling the datagrid's dataBind().
- <com:TDropDownListColumn ....>
- <com:TListItem Value="1" Text="first item" />
- <com:TListItem Value="2" Text="second item" />
- <com:TListItem Value="3" Text="third item" />
- </com:TDropDownListColumn>
The dropdown list control in the TDropDownListColumn can be accessed by one of the following two methods:
The second method is possible because the dropdown list control created within the datagrid cell is the first child.
- $datagridItem->DropDownListColumnID->DropDownList
- $datagridItem->DropDownListColumnID->Controls[0]
Located in /Web/UI/WebControls/TDropDownListColumn.php (line 61)
TComponent | --TApplicationComponent | --TDataGridColumn | --TDropDownListColumn
Adds object parsed from template to the control.
This method adds only TListItem objects into the getItems collection. All other objects are ignored.
Databinds a cell in the column.
This method is invoked when datagrid performs databinding. It populates the content of the cell with the relevant data from data source.
Initializes the specified cell to its initial values.
This method overrides the parent implementation. It creates a textbox for item in edit mode and the column is not read-only. Otherwise it displays a static text. The caption of the button and the static text are retrieved from the datasource.
Loads items from viewstate.
This method overrides the parent implementation by loading list items
Saves items into viewstate.
This method overrides the parent implementation by saving list items
Sets the field of the data source that provides the text content of the column.
If this is not set, the data specified via DataValueField will be displayed in the column.
Sets the field of the data source that provides the key selecting an item in dropdown list.
If this is not present, the data specified via DataTextField (without applying the formatting string) will be used for selection, instead.
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()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
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()
Documentation generated on Mon, 21 Apr 2008 11:34:57 -0400 by phpDocumentor 1.3.0RC4