diff options
Diffstat (limited to 'demos/quickstart/protected')
4 files changed, 57 insertions, 2 deletions
diff --git a/demos/quickstart/protected/controls/TopicList.tpl b/demos/quickstart/protected/controls/TopicList.tpl index 5f81ef99..c7e36184 100644 --- a/demos/quickstart/protected/controls/TopicList.tpl +++ b/demos/quickstart/protected/controls/TopicList.tpl @@ -36,8 +36,8 @@ <a href="?page=Controls.Simple">Simple HTML Controls</a><br/>
<a href="?page=Controls.List">List Controls</a><br/>
<a href="?page=Controls.Validation">Validation Controls</a><br/>
-<a href="?page=Construction">TRepeater</a><br/>
-<a href="?page=Construction">TDataList</a><br/>
+<a href="?page=Controls.Repeater">TRepeater</a><br/>
+<a href="?page=Controls.DataList">TDataList</a><br/>
<a href="?page=Construction">TDataGrid</a><br/>
<a href="?page=Construction">Active Controls</a><br/>
<a href="?page=Construction">Authoring New Controls</a><br/>
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 |