summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataGrid/Sample2.page
blob: 4df112348bf5b666095567a629458d509be8d7a3 (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>TActiveDataGrid Sample 2</h1>
<h2>Using Manually Specified Columns</h2>

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

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

<com:TActiveCheckBoxList
     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:TActiveCheckBoxList>

</com:TPanel>

</com:TContent>