summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages')
-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
3 files changed, 48 insertions, 0 deletions
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