diff options
author | xue <> | 2006-01-17 23:58:54 +0000 |
---|---|---|
committer | xue <> | 2006-01-17 23:58:54 +0000 |
commit | 54900d0145dfda07bde40dc6e1f0b31935b55444 (patch) | |
tree | c34892281f5ffa9f3c907e5ef48c05720707ef5d /demos/quickstart/protected/pages/Controls | |
parent | 3ea0de54c63f5f9ed02e259a789b01952041cfbd (diff) |
Diffstat (limited to 'demos/quickstart/protected/pages/Controls')
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 |