summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.page
blob: 3790d74bf6961c5e67e0304d7f383ede5fb3aa1f (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
<com:TContent ID="body">

<style type="text/css">
<!--
.acomplete { position: relative; z-index: 5; background-color: #EDF5FF; border: 1px solid #243356; }
.acomplete ul, .acomplete li { margin: 0px; padding: 0px; list-style: none; color: #333; }
.acomplete li { padding: 4px; border-top: 1px solid #ccc; }
.acomplete .selected { background-color: #ffc; }
-->
</style>

<h1>TAutoComplete Sample (AJAX)</h1>

<table class="sampletable">

<tr><td class="samplenote">
Simple Autocompleter:
</td><td class="sampleaction">
<com:TAutoComplete
    ID="AutoComplete"
    OnSuggest="suggestNames"
    OnSuggestionSelected="suggestionSelected1"
    ResultPanel.CssClass="acomplete"
    Suggestions.DataKeyField="id" >

    <prop:Suggestions.ItemTemplate>
    <li><%# $this->Data['name'] %></li>
    </prop:Suggestions.ItemTemplate>
</com:TAutoComplete>
<com:TActiveLabel ID="Selection1" />
</td></tr>

<tr><td class="samplenote">
Autocompleter with multiple selection:
</td><td class="sampleaction">
<com:TAutoComplete
    ID="AutoComplete2"
    OnSuggest="suggestNames"
    OnSuggestionSelected="suggestionSelected2"
    Separator=","
    ResultPanel.CssClass="acomplete"
    Suggestions.DataKeyField="id" >

    <prop:Suggestions.ItemTemplate>
    <li><%# $this->Data['name'] %></li>
    </prop:Suggestions.ItemTemplate>
</com:TAutoComplete>
(Use ',' to separate the selected suggestions)
<com:TActiveLabel ID="Selection2" />
</td></tr>

</table>

</com:TContent>