summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected
diff options
context:
space:
mode:
authorxue <>2006-01-17 23:58:54 +0000
committerxue <>2006-01-17 23:58:54 +0000
commit54900d0145dfda07bde40dc6e1f0b31935b55444 (patch)
treec34892281f5ffa9f3c907e5ef48c05720707ef5d /demos/quickstart/protected
parent3ea0de54c63f5f9ed02e259a789b01952041cfbd (diff)
Diffstat (limited to 'demos/quickstart/protected')
-rw-r--r--demos/quickstart/protected/controls/TopicList.tpl2
-rw-r--r--demos/quickstart/protected/pages/Controls/DataGrid.page9
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.page14
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.php25
4 files changed, 49 insertions, 1 deletions
diff --git a/demos/quickstart/protected/controls/TopicList.tpl b/demos/quickstart/protected/controls/TopicList.tpl
index c7e36184..f9992425 100644
--- a/demos/quickstart/protected/controls/TopicList.tpl
+++ b/demos/quickstart/protected/controls/TopicList.tpl
@@ -38,7 +38,7 @@
<a href="?page=Controls.Validation">Validation Controls</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=Controls.DataGrid">TDataGrid</a><br/>
<a href="?page=Construction">Active Controls</a><br/>
<a href="?page=Construction">Authoring New Controls</a><br/>
</div>
diff --git a/demos/quickstart/protected/pages/Controls/DataGrid.page b/demos/quickstart/protected/pages/Controls/DataGrid.page
new file mode 100644
index 00000000..9170fe45
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/DataGrid.page
@@ -0,0 +1,9 @@
+<com:TContent ID="body" >
+
+<h1>TDataGrid</h1>
+<p>
+TBC
+</p>
+<com:RunBar PagePath="Controls.Samples.TDataGrid.Sample1" />
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.page
new file mode 100644
index 00000000..5c24405e
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.page
@@ -0,0 +1,14 @@
+<com:TContent ID="body">
+
+<h1>TDataGrid Sample 1</h1>
+
+<com:TDataGrid
+ ID="DataGrid"
+ ItemStyle.BackColor="blue"
+ ItemStyle.Font.Italic="true"
+ ItemStyle.ForeColor="white"
+ AlternatingItemStyle.BackColor="green"
+ SelectedItemStyle.BackColor="red">
+</com:TDataGrid>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample1.php
new file mode 100644
index 00000000..bf11b133
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/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->DataGrid->DataSource=$this->getDataSource();
+ $this->DataGrid->SelectedItemIndex=2;
+ $this->DataGrid->dataBind();
+ }
+}
+
+?> \ No newline at end of file