summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
blob: 1b33d02c5e89ffc877e7c59a5e3c843d694b20a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<com:TContent ID="body">

<h1>TDataGrid Sample 2</h1>
<h2>Using Manually Specified Columns</h2>

<com:TDataGrid
	Width="700px"
	CellPadding="2"
	ID="DataGrid"
	AutoGenerateColumns="false"
	HeaderStyle.BackColor="black"
	HeaderStyle.ForeColor="white"
	ItemStyle.BackColor="#BFCFFF"
	ItemStyle.Font.Italic="true"
	AlternatingItemStyle.BackColor="#E6ECFF">

	<com:THyperLinkColumn
		HeaderText="Book Title"
		DataTextField="title"
		DataNavigateUrlField="ISBN"
		DataNavigateUrlFormatString="http://www.amazon.com/gp/product/%s"
		Target="_blank"
		/>
	<com:TBoundColumn
		HeaderText="Publisher"
		DataField="publisher"
		/>
	<com:TBoundColumn
		ItemStyle.HorizontalAlign="Right"
		ItemStyle.Wrap="false"
		ItemStyle.Font.Italic="false"
		ItemStyle.ForeColor="green"
		HeaderText="Price"
		DataField="price"
		DataFormatString="$%.2f"
		/>
	<com:TCheckBoxColumn
		HeaderText="In-stock"
		HeaderStyle.Wrap="false"
		DataField="instock"
		/>
	<com:TTemplateColumn>
		<prop:HeaderTemplate>Rating</prop:HeaderTemplate>
		<prop:ItemTemplate>
		<img src="images/star<%#$this->Parent->DataItem['rating']%>.gif" alt="" />
		</prop:ItemTemplate>
	</com:TTemplateColumn>
</com:TDataGrid>

<com:TPanel GroupingText="Column Visibility" Width="200px">

<com:TCheckBoxList
     AutoPostBack="true"
     OnSelectedIndexChanged="toggleColumnVisibility">
    <com:TListItem Text="Book Title" Selected="true" />
    <com:TListItem Text="Publisher" Selected="true" />
    <com:TListItem Text="Price" Selected="true" />
    <com:TListItem Text="In-stock" Selected="true" />
    <com:TListItem Text="Rating" Selected="true" />
</com:TCheckBoxList>

</com:TPanel>

</com:TContent>