TDataBoundControl is the based class for controls that need to populate data from data sources. It provides basic properties and methods that allow the derived controls to associate with data sources and retrieve data from them. TBC.... TDataBoundControl is equipped with paging capabilities. By setting {@link setAllowPaging AllowPaging} to true, the input data will be paged and only one page of data is actually populated into the data-bound control. This saves a lot of memory when dealing with larget datasets. To specify the number of data items displayed on each page, set the {@link setPageSize PageSize} property, and to specify which page of data to be displayed, set {@link setCurrentPageIndex CurrentPageIndex}. When the size of the original data is too big to be loaded all in the memory, one can enable custom paging. In custom paging, the total number of data items is specified manually via {@link setVirtualItemCount VirtualItemCount}, and the data source only needs to contain the current page of data. To enable custom paging, set {@link setAllowCustomPaging AllowCustomPaging} to true.
Since: 3.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends TWebControl
Exemple #1
0
 /**
  * Loads item count information from viewstate.
  * This method is invoked right after control state is loaded.
  */
 public function loadState()
 {
     parent::loadState();
     if (!$this->getIsDataBound()) {
         $this->restoreItemsFromViewState();
     }
     $this->clearViewState('ItemCount');
 }
Exemple #2
0
 /**
  * Loads items from viewstate.
  * This method is invoked right after control state is loaded.
  */
 public function loadState()
 {
     parent::loadState();
     $this->_stateLoaded = true;
     if (!$this->getIsDataBound()) {
         $this->_items = $this->createListItemCollection();
         $this->_items->loadState($this->getViewState('Items', null));
     }
     $this->clearViewState('Items');
 }