public function __construct($id, $DataSource, $header = true, $paginator = false, $useajax = false) { AbstractList::__construct($id, $DataSource); $this->header = $header; $this->paginator = $paginator; $this->useajax = $useajax; }
/** * Обновляет данные с провайдера */ public function Reload($resetpage = true) { parent::Reload($resetpage); $this->components = array(); $list = $this->getItems(); $i = 1; foreach ($list as $item) { //$datarow = new DataRow($this->id,$list[0]); $datarow = new DataRow($this->id, $item, $i++, $i - 1 + $this->pagesize * ($this->currentpage - 1)); $this->add($datarow); $this->rowevent->onEvent($datarow); //вызов обработчика добавляющего данные или елементы в строку $datarow->updateChildId(); if ($item->getID() == $this->selectedRow && $this->selectedclass != "") { $datarow->setAttribute('class', $this->selectedclass); } } }
/** * Конструктор * @param mixed ID компонента * @param mixed ID строки * @param mixed Провадер данных для таблицы */ public function __construct($id, $DataSource, EventReceiver $receiver, $handler) { AbstractList::__construct($id, $DataSource); $this->rowevent = new Event($receiver, $handler); }
/** * Обновляет данные с провайдера */ public function Reload($resetpage = true) { parent::Reload($resetpage); $this->datalist = $this->getItems(); }