Implements interfaces:
TDataList class
TDataList represents a data bound and updatable list control.
The HeaderTemplate property specifies the content template that will be displayed at the beginning, while FooterTemplate at the end. If present, these two templates will only be rendered when the data list is given non-empty data. In this case, for each data item the content defined by ItemTemplate will be generated and displayed once. If AlternatingItemTemplate is not empty, then the corresponding content will be displayed alternatively with that in ItemTemplate. The content in SeparatorTemplate, if not empty, will be displayed between items. Besides the above templates, there are two additional templates, EditItemTemplate and SelectedItemTemplate, which are used to display items that are in edit and selected mode, respectively.
All these templates are associated with styles that may be applied to the corresponding generated items. For example, AlternatingItemStyle will be applied to every alternating item in the data list.
Item styles are applied in a hierarchical way. Style in higher hierarchy will inherit from styles in lower hierarchy. Starting from the lowest hierarchy, the item styles include item's own style, ItemStyle, AlternatingItemStyle, SelectedItemStyle, and EditItemStyle. Therefore, if background color is set as red in ItemStyle, EditItemStyle will also have red background color unless it is set to a different value explicitly.
To change the status of a particular item, set SelectedItemIndex or EditItemIndex. The former will change the indicated item to selected mode, which will cause the item to use SelectedItemTemplate for presentation. The latter will change the indicated item to edit mode. Note, if an item is in edit mode, then selecting this item will have no effect.
The layout of the data items in the list is specified via RepeatLayout, which can be either 'Table' (default) or 'Flow'. A table layout uses HTML table cells to organize the data items while a flow layout uses line breaks to organize the data items. When the layout is using 'Table', CellPadding and CellSpacing can be used to adjust the cellpadding and cellpadding of the table, and Caption and CaptionAlign can be used to add a table caption with the specified alignment.
The number of columns used to display the data items is specified via RepeatColumns property, while the RepeatDirection governs the order of the items being rendered.
You can retrive the repeated contents by the Items property. The header and footer items can be accessed by Header and Footer properties, respectively.
When TDataList creates an item, it will raise an OnItemCreated so that you may customize the newly created item. When databinding is performed by TDataList, for each item once it has finished databinding, an OnItemDataBound event will be raised.
When an item is selected by an end-user, a OnSelectedIndexChanged event will be raised. Note, the selected index may not be actually changed. The event mainly informs the server side that the end-user has made a selection.
TDataList raises an OnItemCommand whenever a button control within some TDataList item raises a OnCommand event. If the command name is one of the followings: 'edit', 'update', 'select', 'delete', 'cancel' (case-insensitive), another event will also be raised. For example, if the command name is 'edit', then the new event is OnEditCommand.
Located in /Web/UI/WebControls/TDataList.php (line 99)
TComponent | --TApplicationComponent | --TControl | --TWebControl | --TDataBoundControl | --TBaseDataList | --TDataList
Applies styles to items, header, footer and separators.
Item styles are applied in a hierarchical way. Style in higher hierarchy will inherit from styles in lower hierarchy. Starting from the lowest hierarchy, the item styles include item's own style, ItemStyle, AlternatingItemStyle, SelectedItemStyle, and EditItemStyle. Therefore, if background color is set as red in ItemStyle, EditItemStyle will also have red background color unless it is set to a different value explicitly.
This method overrides parent's implementation to handle onItemCommand event which is bubbled from TDataListItem child controls.
If the event parameter is TDataListCommandEventParameter and the command name is a recognized one, which includes 'select', 'edit', 'delete', 'update', and 'cancel' (case-insensitive), then a corresponding command event is also raised (such as OnEditCommand). This method should only be used by control developers.
Creates a DataList item instance based on the item type and index.
Returns a style used for rendering items.
This method is required by IRepeatInfoUser interface.
Returns a value indicating whether this control contains footer item.
This method is required by IRepeatInfoUser interface.
Returns a value indicating whether this control contains header item.
This method is required by IRepeatInfoUser interface.
Returns a value indicating whether this control contains separator items.
This method is required by IRepeatInfoUser interface.
Initializes a data list item.
The item is added as a child of the data list and the corresponding template is instantiated within the item.
Loads item count information from viewstate.
This method is invoked right after control state is loaded.
Raises OnCancelCommand event.
This method is invoked when a child control of the data list raises an Command event and the command name is 'cancel' (case-insensitive).
Raises OnDeleteCommand event.
This method is invoked when a child control of the data list raises an Command event and the command name is 'delete' (case-insensitive).
Raises OnEditCommand event.
This method is invoked when a child control of the data list raises an Command event and the command name is 'edit' (case-insensitive).
Raises OnItemCommand event.
This method is invoked when a child control of the data list raises an Command event.
Raises OnItemCreated event.
This method is invoked after a data list item is created and instantiated with template, but before added to the page hierarchy. The TDataListItem control responsible for the event can be determined from the event parameter. If you override this method, be sure to call parent's implementation so that event handlers have chance to respond to the event.
Raises OnItemDataBound event.
This method is invoked right after an item is data bound. The TDataListItem control responsible for the event can be determined from the event parameter. If you override this method, be sure to call parent's implementation so that event handlers have chance to respond to the event.
Raises OnUpdateCommand event.
This method is invoked when a child control of the data list raises an Command event and the command name is 'update' (case-insensitive).
Performs databinding to populate data list items from data source.
This method is invoked by dataBind(). You may override this function to provide your own way of data population.
Renders the data list control.
This method overrides the parent implementation.
Renders an item in the list.
This method is required by IRepeatInfoUser interface.
Clears up all items in the data list.
Creates data list items based on viewstate information.
Saves item count in viewstate.
This method is invoked right before control state is to be saved.
Edits an item by its index in getItems.
Previously editting item will change to normal item state. If the index is less than 0, any existing edit item will be cleared up.
Selects an item by its index in getItems.
Previously selected item will be un-selected. If the item to be selected is already in edit mode, it will remain in edit mode. If the index is less than 0, any existing selection will be cleared up.
Inherited From TBaseDataList
TBaseDataList::addParsedObject()
TBaseDataList::createStyle()
TBaseDataList::getCaption()
TBaseDataList::getCaptionAlign()
TBaseDataList::getCellPadding()
TBaseDataList::getCellSpacing()
TBaseDataList::getDataFieldValue()
TBaseDataList::getDataKeyField()
TBaseDataList::getDataKeys()
TBaseDataList::getGridLines()
TBaseDataList::getHorizontalAlign()
TBaseDataList::onSelectedIndexChanged()
TBaseDataList::setCaption()
TBaseDataList::setCaptionAlign()
TBaseDataList::setCellPadding()
TBaseDataList::setCellSpacing()
TBaseDataList::setDataKeyField()
TBaseDataList::setGridLines()
TBaseDataList::setHorizontalAlign()
Inherited From TDataBoundControl
TDataBoundControl::dataBind()
TDataBoundControl::dataSourceViewChanged()
TDataBoundControl::determineDataSource()
TDataBoundControl::ensureDataBound()
TDataBoundControl::getData()
TDataBoundControl::getDataMember()
TDataBoundControl::getDataSource()
TDataBoundControl::getDataSourceID()
TDataBoundControl::getDataSourceView()
TDataBoundControl::getInitialized()
TDataBoundControl::getIsDataBound()
TDataBoundControl::getRequiresDataBinding()
TDataBoundControl::getSelectParameters()
TDataBoundControl::getUsingDataSourceID()
TDataBoundControl::onDataBound()
TDataBoundControl::onDataSourceChanged()
TDataBoundControl::onInit()
TDataBoundControl::onPreRender()
TDataBoundControl::pagePreLoad()
TDataBoundControl::performDataBinding()
TDataBoundControl::setDataMember()
TDataBoundControl::setDataSource()
TDataBoundControl::setDataSourceID()
TDataBoundControl::setInitialized()
TDataBoundControl::setIsDataBound()
TDataBoundControl::setRequiresDataBinding()
TDataBoundControl::validateDataSource()
Inherited From TWebControl
TWebControl::addAttributesToRender()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getFont()
TWebControl::getForeColor()
TWebControl::getHasStyle()
TWebControl::getHeight()
TWebControl::getStyle()
TWebControl::getTabIndex()
TWebControl::getTagName()
TWebControl::getToolTip()
TWebControl::getWidth()
TWebControl::render()
TWebControl::renderBeginTag()
TWebControl::renderContents()
TWebControl::renderEndTag()
TWebControl::setAccessKey()
TWebControl::setBackColor()
TWebControl::setBorderColor()
TWebControl::setBorderStyle()
TWebControl::setBorderWidth()
TWebControl::setCssClass()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()
Inherited From TControl
TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::broadcastEventInternal()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::createChildControls()
TControl::createControlCollection()
TControl::createdOnTemplate()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasControls()
TControl::getID()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
CMD_CANCEL
= 'Cancel'
(line 108)
CMD_DELETE
= 'Delete'
(line 107)
CMD_EDIT
= 'Edit'
(line 105)
CMD_SELECT
= 'Select'
(line 104)
Command name that TDataList understands.
CMD_UPDATE
= 'Update'
(line 106)
Inherited from TControl
Documentation generated on Sun, 04 Jun 2006 18:59:08 -0400 by phpDocumentor 1.3.0RC4