summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
authorxue <>2006-01-14 06:56:13 +0000
committerxue <>2006-01-14 06:56:13 +0000
commitf8259bb73731552eb77dcd1254d711507e4932c4 (patch)
tree4faa0c94c90e870f3070d0d4bb98ea85cc5513f4 /demos/quickstart/protected/pages
parent5a63c2c1989ed9fdcf8fbe00ec8161934768daf3 (diff)
TDataList completed. A preliminary demo added.
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r--demos/quickstart/protected/pages/Controls/DataList.page9
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page21
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.php25
3 files changed, 55 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/DataList.page b/demos/quickstart/protected/pages/Controls/DataList.page
new file mode 100644
index 00000000..65919ee2
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/DataList.page
@@ -0,0 +1,9 @@
+<com:TContent ID="body" >
+
+<h1>TDataList</h1>
+<p>
+TBC
+</p>
+<com:RunBar PagePath="Controls.Samples.TDataList.Sample1" />
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
new file mode 100644
index 00000000..e25525f8
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
@@ -0,0 +1,21 @@
+<com:TContent ID="body">
+
+<h1>TDataList Sample 1</h1>
+
+<com:TDataList
+ ID="DataList"
+ RepeatColumns="2"
+ ItemStyle.BackColor="blue"
+ ItemStyle.Font.Italic="true"
+ ItemStyle.ForeColor="white"
+ SelectedItemStyle.BackColor="white"
+ SelectedItemStyle.ForeColor="blue"
+ CellPadding="4">
+
+<prop:ItemTemplate>
+<%#$this->Parent->DataItem['name']%>
+</prop:ItemTemplate>
+
+</com:TDataList>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.php b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.php
new file mode 100644
index 00000000..0f72dbf5
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.php
@@ -0,0 +1,25 @@
+<?php
+
+class Sample1 extends TPage
+{
+ protected function getDataSource()
+ {
+ return array(
+ array('name'=>'John','age'=>'31'),
+ array('name'=>'Bea','age'=>'35'),
+ array('name'=>'Rose','age'=>'33'),
+ array('name'=>'Diane','age'=>'37'),
+ array('name'=>'Bob','age'=>'30'),
+ );
+ }
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $this->DataList->DataSource=$this->getDataSource();
+ $this->DataList->SelectedItemIndex=1;
+ $this->DataList->dataBind();
+ }
+}
+
+?> \ No newline at end of file