Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class RegionDisplay extends TRepeaterItemRenderer
4
{
5
	/**
6
	 * This method is invoked when the data is being bound
7
	 * to the parent repeater.
8
	 * At this time, the <b>Data</b> is available which
9
	 * refers to the data row associated with the parent repeater item.
10
	 */
11
	public function onDataBinding($param)
12
	{
13
		parent::onDataBinding($param);
14
		$this->Repeater->DataSource=$this->Data['detail'];
15
		$this->Repeater->dataBind();
16
	}
17
 
18
	public function itemCreated($sender,$param)
19
	{
20
		static $itemIndex=0;
21
		$item=$param->Item;
22
		if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
23
			$item->Row->BackColor=$itemIndex%2 ? "#BFCFFF" : "#E6ECFF";
24
		$itemIndex++;
25
	}
26
}
27
 
28
?>