-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.component.html
61 lines (58 loc) · 2.19 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
57
58
59
60
61
<dx-data-grid id="gridContainer"
[dataSource]="employees"
keyExpr="ID"
[showBorders]="true"
(onEditCanceled)="onEditCanceled($event)"
(onSaved)="onSaved($event)">
<dxo-editing
mode="popup"
[allowUpdating]="true">
<dxo-popup
title="Employee Info"
[showTitle]="true"
[width]="700">
</dxo-popup>
<dxo-form>
<dxi-item itemType="group" [colCount]="2" [colSpan]="2">
<dxi-item dataField="Prefix"></dxi-item>
<dxi-item dataField="FirstName"></dxi-item>
<dxi-item dataField="LastName"></dxi-item>
<dxi-item dataField="Position"></dxi-item>
<dxi-item dataField="BirthDate"></dxi-item>
<dxi-item dataField="HireDate"></dxi-item>
</dxi-item>
<dxi-item itemType="group" caption="Photo" [colCount]="2" [colSpan]="2">
<dxi-item dataField="Picture" [colSpan]="2"></dxi-item>
</dxi-item>
</dxo-form>
</dxo-editing>
<dxi-column dataField="Picture" [width]="70"
[allowFiltering]="false"
[allowSorting]="false"
cellTemplate="cellTemplate"
editCellTemplate="editCellTemplate">
</dxi-column>
<dxi-column dataField="Prefix" [width]="70" caption="Title"></dxi-column>
<dxi-column dataField="FirstName"></dxi-column>
<dxi-column dataField="LastName"></dxi-column>
<dxi-column dataField="Position"></dxi-column>
<dxi-column dataField="BirthDate" dataType="date"></dxi-column>
<dxi-column dataField="HireDate" dataType="date"></dxi-column>
<div *dxTemplate="let data of 'cellTemplate'">
<img [src]="backendURL + data.value"/>
</div>
<div *dxTemplate="let data of 'editCellTemplate'">
<img #uploadedImage class="uploadedImage" [src]="backendURL + data.value"/>
<dx-file-uploader
#fileUploader
[multiple]="false"
accept="image/!*"
uploadMode="instantly"
[uploadUrl]="backendURL + 'FileUpload/post'"
(onValueChanged)="onValueChanged($event)"
(onUploaded)="onUploaded($event, data)"
(onUploadError)="onUploadError($event)"
></dx-file-uploader>
<dx-button class="retryButton" text="Retry" [visible]="retryButtonVisible" (click)="onClick($event)"></dx-button>
</div>
</dx-data-grid>