-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.component.html
56 lines (56 loc) · 1.47 KB
/
app.component.html
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
<div class="dx-fieldset" style="width:50%">
<div class="dx-fieldset-header">Standalone editors</div>
<div class="dx-field">
<div class="dx-field-label">State</div>
<div class="dx-field-value">
<dx-select-box
[dataSource]="states"
displayExpr="Name"
valueExpr="ID"
(onValueChanged)="onStateChanged($event)"
[showClearButton]="true"
></dx-select-box>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">City</div>
<div class="dx-field-value">
<dx-select-box
#citySelectBox
displayExpr="Name"
valueExpr="ID"
[(value)]="selectedCityID"
[dataSource]="cities"
></dx-select-box>
</div>
</div>
<div class="dx-fieldset-header">In Form</div>
<div class="dx-field">
<dx-form
[(formData)]="address"
(onFieldDataChanged)="onFieldDataChanged($event)"
>
<dxi-item
dataField="StateID"
editorType="dxSelectBox"
[editorOptions]='{
dataSource: states,
valueExpr: "ID",
displayExpr: "Name",
showClearButton: true }'
>
<dxo-label text="State"></dxo-label>
</dxi-item>
<dxi-item
dataField="CityID"
editorType="dxSelectBox"
[editorOptions]='{
dataSource: cities,
valueExpr: "ID",
displayExpr: "Name" }'
>
<dxo-label text="City"></dxo-label>
</dxi-item>
</dx-form>
</div>
</div>