Template file: Sample1.page
Class file: Sample1.php
Template file: Sample2.page
Class file: Sample2.php
Template file: Sample3.page
Class file: Sample3.php
Template file: Sample4.page
Class file: Sample4.php
Template file: Sample5.page
Class file: Sample5.php

/ActiveControls/Samples/TActiveDataGrid/Sample4.page

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