Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<com:TContent ID="body">
2
 
3
<h1>TDataList Sample 1</h1>
4
<p>
5
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.
6
</p>
7
<p>
8
Since the page is mainly for display and does not require user interactions, the viewstate of TDataList is disabled to reduce page size.
9
</p>
10
 
11
<com:TDataList
12
     ID="DataList"
13
     EnableViewState="false"
14
     RepeatColumns="3"
15
     RepeatDirection="Horizontal"
16
     ItemStyle.Font.Italic="true"
17
     ItemStyle.BackColor="#BFCFFF"
18
     HeaderStyle.BackColor="black"
19
     HeaderStyle.ForeColor="white"
20
     FooterStyle.BackColor="gray"
21
     AlternatingItemStyle.BackColor="#E6ECFF">
22
 
23
<prop:HeaderTemplate>
24
<div style="font-weight:bold; text-align:center;">Computer Parts</div>
25
</prop:HeaderTemplate>
26
 
27
<prop:FooterTemplate>
28
<div style="font-weight:bold; text-align:center;">
29
Total <%# $this->Parent->ItemCount %> products.
30
</div>
31
</prop:FooterTemplate>
32
 
33
<prop:ItemTemplate>
34
<table border="0" width="100%">
35
<tr>
36
  <th>ID</th><th>Name</th><th>Quantity</th><th>Price</th>
37
</tr>
38
<tr>
39
  <td align="right"><%#$this->DataItem['id'] %></td>
40
  <td align="right"><%#$this->DataItem['name'] %></td>
41
  <td align="right"><%#$this->DataItem['quantity'] %></td>
42
  <td align="right">$<%#$this->DataItem['price'] %></td>
43
</tr>
44
</table>
45
</prop:ItemTemplate>
46
 
47
</com:TDataList>
48
 
49
<div class="last-modified">$Id: Sample1.page 1650 2007-01-24 06:55:32Z wei $</div></com:TContent>