summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
diff options
context:
space:
mode:
authorxue <>2006-02-01 20:44:03 +0000
committerxue <>2006-02-01 20:44:03 +0000
commit93f6933c39b2e1896ff781a8f839a3c73a7e56b1 (patch)
treec85ab3f1cdd26a70e21598ef06bb741fe93cc892 /demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
parentd602f32bf108ccf58df7880227dc64d2cfa33e13 (diff)
TDataList demos are completed.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page50
1 files changed, 36 insertions, 14 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
index d2b94084..467dc239 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
@@ -1,26 +1,48 @@
<com:TContent ID="body">
<h1>TDataList Sample 1</h1>
+<p>
+TDataList is good at displaying tabular data in a non-tabular format. The following example displays a list of computer product information in 3 columns.
+</p>
+<p>
+Since the page is mainly for display and does not require user interactions, the viewstate of TDataList is disabled to reduce page size.
+</p>
<com:TDataList
- ID="DataList"
- RepeatColumns="2"
- RepeatDirection="Horizontal"
- ItemStyle.BackColor="blue"
- ItemStyle.Font.Italic="true"
- ItemStyle.ForeColor="white"
- AlternatingItemStyle.BackColor="green"
- SelectedItemStyle.BackColor="red"
- CellPadding="4">
+ ID="DataList"
+ EnableViewState="false"
+ RepeatColumns="3"
+ RepeatDirection="Horizontal"
+ ItemStyle.Font.Italic="true"
+ ItemStyle.BackColor="lightgreen"
+ HeaderStyle.BackColor="#AAAADD"
+ FooterStyle.BackColor="#DDAAAA"
+ AlternatingItemStyle.BackColor="lightyellow">
+
+<prop:HeaderTemplate>
+<div style="font-weight:bold; text-align:center;">Computer Parts</div>
+</prop:HeaderTemplate>
+
+<prop:FooterTemplate>
+<div style="font-weight:bold; text-align:center;">
+Total <%# $this->Parent->Parent->ItemCount %> products.
+</div>
+</prop:FooterTemplate>
<prop:ItemTemplate>
-<%#$this->Parent->DataItem['name']%>
+<table border="1" width="100%">
+<tr>
+ <th>ID</th><th>Name</th><th>Quantity</th><th>Price</th>
+</tr>
+<tr>
+ <td align="right"><%#$this->Parent->DataItem['id'] %></td>
+ <td align="right"><%#$this->Parent->DataItem['name'] %></td>
+ <td align="right"><%#$this->Parent->DataItem['quantity'] %></td>
+ <td align="right">$<%#$this->Parent->DataItem['price'] %></td>
+</tr>
+</table>
</prop:ItemTemplate>
-<prop:AlternatingItemTemplate>
-<%#$this->Parent->DataItem['name']%>
-</prop:AlternatingItemTemplate>
-
</com:TDataList>
</com:TContent> \ No newline at end of file