diff options
author | Christophe.Boulain <> | 2009-09-29 08:33:46 +0000 |
---|---|---|
committer | Christophe.Boulain <> | 2009-09-29 08:33:46 +0000 |
commit | d76123127139a7cb013a0e4c17a63eb8aab57e3e (patch) | |
tree | 4a6093cec85636f5e595b66f4fb33f77f1d424e1 /demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php | |
parent | b49bc6e7db63f0ae9788970108c4d2f20d841bed (diff) |
Added TActiveDataGrid and TActiveRepeater from LCS
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php')
-rw-r--r-- | demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/RegionDisplay.php | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ +<?php
+
+class RegionDisplay extends TRepeaterItemRenderer
+{
+ /**
+ * This method is invoked when the data is being bound
+ * to the parent repeater.
+ * At this time, the <b>Data</b> 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 |