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/Sample3.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<com:TContent ID="body">
 
<h1>TActiveDataGrid Sample 3</h1>
<h2>Interacting with TActiveDataGrid</h2>
 
<com:TActiveDataGrid
    Width="800px"
    CellPadding="2"
    ID="DataGrid"
    DataKeyField="ISBN"
    AutoGenerateColumns="false"
    HeaderStyle.BackColor="black"
    HeaderStyle.ForeColor="white"
    ItemStyle.BackColor="#BFCFFF"
    ItemStyle.Font.Italic="true"
    AlternatingItemStyle.BackColor="#E6ECFF"
    EditItemStyle.BackColor="lightyellow"
    OnItemCreated="itemCreated"
    OnEditCommand="editItem"
    OnUpdateCommand="saveItem"
    OnCancelCommand="cancelItem"
    OnDeleteCommand="deleteItem"
    >
 
    <com:TActiveBoundColumn
        ID="BookTitleColumn"
        HeaderText="Book Title"
        HeaderStyle.Width="400px"
        DataField="title"
        />
    <com:TActiveBoundColumn
        ID="PublisherColumn"
        HeaderText="Publisher"
        HeaderStyle.Width="150px"
        DataField="publisher"
        />
    <com:TActiveBoundColumn
        ID="PriceColumn"
        ItemStyle.HorizontalAlign="Right"
        ItemStyle.Wrap="false"
        ItemStyle.Font.Italic="false"
        ItemStyle.ForeColor="green"
        HeaderText="Price"
        HeaderStyle.Width="70px"
        DataField="price"
        DataFormatString="$%.2f"
        />
    <com:TActiveCheckBoxColumn
        ID="InStockColumn"
        HeaderText="In-stock"
        DataField="instock"
        />
    <com:TActiveDropDownListColumn 
        ID="RatingColumn"
        HeaderText="Rating"
        DataTextField="rating"
        >
        <prop:DataTextFormatString><img src="images/star%s.gif" alt="" /></prop:DataTextFormatString>
        <com:TListItem Value="1" />
        <com:TListItem Value="2" />
        <com:TListItem Value="3" />
        <com:TListItem Value="4" />
        <com:TListItem Value="5" />
    </com:TActiveDropDownListColumn>
    <com:TActiveEditCommandColumn
        HeaderText="Edit"
        HeaderStyle.Width="100px"
        UpdateText="Save"
        ItemStyle.HorizontalAlign="Center"
        ItemStyle.Font.Italic="false"
        />
    <com:TActiveButtonColumn
        ID="DeleteColumn"
        HeaderText="Delete"
        HeaderStyle.Width="50px"
        ItemStyle.HorizontalAlign="Center"
        ItemStyle.Font.Italic="false"
        Text="Delete"
        CommandName="delete"
        />
</com:TActiveDataGrid>
 
</com:TContent>