Implements interfaces:
TDataList class
TDataList represents a data bound and updatable list control.
Like TRepeater, TDataList displays its content repeatedly based on the data fetched from DataSource. The repeated contents in TDataList are called items, which are controls and can be accessed through Items. When dataBind() is invoked, TDataList creates an item for each row of data and binds the data row to the item. Optionally, a TDataList can have a header, a footer and/or separators between items.
TDataList differs from TRepeater in that it supports tiling the items in different manners and it maintains status of items to handle data update.
The layout of the repeated contents are specified by inline templates. TDataList items, header, footer, etc. are being instantiated with the corresponding templates when data is being bound to the repeater.
Since v3.1.0, the layout can also be by renderers. A renderer is a control class that can be instantiated as datalist items, header, etc. A renderer can thus be viewed as an external template (in fact, it can also be non-templated controls).
A renderer can be any control class.
The following properties are used to specify different types of template and renderer for a datalist:
for each repeated row of data for each alternating row of data. If not set, ItemTemplate or ItemRenderer will be used instead. for the datalist header. for the datalist footer. for content to be displayed between items. used when data bound to the datalist is empty. for the row being editted. for the row being selected.If a content type is defined with both a template and a renderer, the latter takes precedence.
When dataBind() is being called, TDataList undergoes the following lifecycles for each row of data:
An additional event is raised if the OnCommand event has one of the following command names:
Different styles may be applied to items in different status. The style application is performed in a hierarchical way: Style in higher hierarchy will inherit from styles in lower hierarchy. Starting from the lowest hierarchy, the item styles include
When a page containing a datalist is post back, the datalist will restore automatically all its contents, including items, header, footer and separators. However, the data row associated with each item will not be recovered and become null. To access the data, use one of the following ways:
Located in /Web/UI/WebControls/TDataList.php (line 153)
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 datalist items and their 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 empty datalist content.
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.
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 OnCommand 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 OnCommand 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 OnCommand 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 OnCommand 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 datalist item 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 datalist item 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 OnCommand 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.
Sets the alternative item renderer class.
If not empty, the class will be used to instantiate as alternative datalist items. This property takes precedence over AlternatingItemTemplate.
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.
Sets the renderer class for the datalist item being editted.
If not empty, the class will be used to instantiate as the datalist item. This property takes precedence over EditItemTemplate.
Sets the datalist empty renderer class.
The empty renderer is created as the child of the datalist if data bound to the datalist is empty. This property takes precedence over EmptyTemplate.
Sets the datalist footer renderer class.
If not empty, the class will be used to instantiate as datalist footer item. This property takes precedence over FooterTemplate.
Sets the datalist header renderer class.
If not empty, the class will be used to instantiate as datalist header item. This property takes precedence over HeaderTemplate.
Sets the item renderer class.
If not empty, the class will be used to instantiate as datalist items. This property takes precedence over ItemTemplate.
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.
Sets the renderer class for the datalist item being selected.
If not empty, the class will be used to instantiate as the datalist item. This property takes precedence over SelectedItemTemplate.
Sets the datalist item separator renderer class.
If not empty, the class will be used to instantiate as datalist item separators. This property takes precedence over SeparatorTemplate.
Inherited From TBaseDataList
TBaseDataList::createStyle()
TBaseDataList::getCellPadding()
TBaseDataList::getCellSpacing()
TBaseDataList::getDataFieldValue()
TBaseDataList::getDataKeyField()
TBaseDataList::getDataKeys()
TBaseDataList::getGridLines()
TBaseDataList::getHorizontalAlign()
TBaseDataList::onSelectedIndexChanged()
TBaseDataList::setCellPadding()
TBaseDataList::setCellSpacing()
TBaseDataList::setDataKeyField()
TBaseDataList::setGridLines()
TBaseDataList::setHorizontalAlign()
Inherited From TDataBoundControl
TDataBoundControl::createPagedDataSource()
TDataBoundControl::dataBind()
TDataBoundControl::dataSourceViewChanged()
TDataBoundControl::determineDataSource()
TDataBoundControl::ensureDataBound()
TDataBoundControl::getAllowCustomPaging()
TDataBoundControl::getAllowPaging()
TDataBoundControl::getCurrentPageIndex()
TDataBoundControl::getDataMember()
TDataBoundControl::getDataSource()
TDataBoundControl::getDataSourceID()
TDataBoundControl::getDataSourceView()
TDataBoundControl::getInitialized()
TDataBoundControl::getIsDataBound()
TDataBoundControl::getPageCount()
TDataBoundControl::getPageSize()
TDataBoundControl::getRequiresDataBinding()
TDataBoundControl::getSelectParameters()
TDataBoundControl::getUsingDataSourceID()
TDataBoundControl::getVirtualItemCount()
TDataBoundControl::onDataBound()
TDataBoundControl::onDataSourceChanged()
TDataBoundControl::onInit()
TDataBoundControl::onPreRender()
TDataBoundControl::pagePreLoad()
TDataBoundControl::performDataBinding()
TDataBoundControl::setAllowCustomPaging()
TDataBoundControl::setAllowPaging()
TDataBoundControl::setCurrentPageIndex()
TDataBoundControl::setDataMember()
TDataBoundControl::setDataSource()
TDataBoundControl::setDataSourceID()
TDataBoundControl::setInitialized()
TDataBoundControl::setIsDataBound()
TDataBoundControl::setPageSize()
TDataBoundControl::setRequiresDataBinding()
TDataBoundControl::setVirtualItemCount()
TDataBoundControl::validateDataSource()
Inherited From TWebControl
TWebControl::addAttributesToRender()
TWebControl::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDisplay()
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::setDisplay()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()
Inherited From TControl
TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::convertUniqueIdToClientId()
TControl::createChildControls()
TControl::createControlCollection()
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::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
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::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::trackViewState()
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::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()
Command name that TDataList understands. They are case-insensitive.
Inherited from TControl
TControl::AUTOMATIC_ID_PREFIX
TControl::CLIENT_ID_SEPARATOR
TControl::CS_CHILD_INITIALIZED
TControl::CS_CONSTRUCTED
TControl::CS_INITIALIZED
TControl::CS_LOADED
TControl::CS_PRERENDERED
TControl::CS_STATE_LOADED
TControl::ID_FORMAT
TControl::ID_SEPARATOR
TControl::IS_CHILD_CREATED
TControl::IS_CREATING_CHILD
TControl::IS_DISABLE_THEMING
TControl::IS_DISABLE_VIEWSTATE
TControl::IS_ID_SET
TControl::IS_SKIN_APPLIED
TControl::IS_STYLESHEET_APPLIED
TControl::RF_ADAPTER
TControl::RF_AUTO_BINDINGS
TControl::RF_CHILD_STATE
TControl::RF_CONTROLS
TControl::RF_CONTROLSTATE
TControl::RF_DATA_BINDINGS
TControl::RF_EVENTS
TControl::RF_NAMED_CONTROLS
TControl::RF_NAMED_CONTROLS_ID
TControl::RF_NAMED_OBJECTS
TControl::RF_SKIN_ID
Documentation generated on Mon, 21 Apr 2008 11:34:34 -0400 by phpDocumentor 1.3.0RC4