From d76123127139a7cb013a0e4c17a63eb8aab57e3e Mon Sep 17 00:00:00 2001 From: "Christophe.Boulain" <> Date: Tue, 29 Sep 2009 08:33:46 +0000 Subject: Added TActiveDataGrid and TActiveRepeater from LCS --- .../Samples/TActiveRepeater/RegionDisplay.php | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php') diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php new file mode 100644 index 00000000..40d1841e --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php @@ -0,0 +1,28 @@ +Data is available which + * refers to the data row associated with the parent repeater item. + */ + public function onDataBinding($param) + { + parent::onDataBinding($param); + $this->Repeater->DataSource=$this->Data['detail']; + $this->Repeater->dataBind(); + } + + public function itemCreated($sender,$param) + { + static $itemIndex=0; + $item=$param->Item; + if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem') + $item->Row->BackColor=$itemIndex%2 ? "#BFCFFF" : "#E6ECFF"; + $itemIndex++; + } +} + +?> \ No newline at end of file -- cgit v1.2.3