The active control counter part to drop down list control. The {@link setAutoPostBack AutoPostBack} property is set to true by default. Thus, when the drop down list selection is changed the {@link onCallback OnCallback} event is raised after {@link OnSelectedIndexChanged} event. With {@link TBaseActiveControl::setEnableUpdate() ActiveControl.EnableUpdate} set to true (default is true), changes to the selection, after OnLoad event has been raised, will be updated. on the client side. List items can be changed dynamically during a callback request.
Since: 3.1
Inheritance: extends Prado\Web\UI\WebControls\TDropDownList, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler, implements Prado\Web\UI\ActiveControls\IActiveControl
Exemple #1
0
 /**
  * Builds a dropdown list pager
  * Override parent implementation to build Active dropdown lists.
  */
 protected function buildListPager()
 {
     $list = new TActiveDropDownList();
     $list->getAdapter()->getBaseActiveControl()->setClientSide($this->getClientSide());
     $this->getControls()->add($list);
     $list->setDataSource(range(1, $this->getPageCount()));
     $list->dataBind();
     $list->setSelectedIndex($this->getCurrentPageIndex());
     $list->setAutoPostBack(true);
     $list->attachEventHandler('OnSelectedIndexChanged', array($this, 'listIndexChanged'));
     $list->attachEventHandler('OnCallback', array($this, 'handleCallback'));
 }