-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.component.html
More file actions
170 lines (167 loc) · 5.07 KB
/
Copy pathapp.component.html
File metadata and controls
170 lines (167 loc) · 5.07 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!-- Row - Row template -->
<!-- <ejs-treegrid [dataSource]="data" width="auto" height="580" childMapping="Children">
<e-columns>
<e-column field="EmpID" headerText="Employee ID" width="180"></e-column>
<e-column field="Name" headerText="Employee Name" width="150"></e-column>
<e-column field="DOB" headerText="Date of Birth" width="150" format="yMd"></e-column>
<e-column
field="Address"
headerText="Employee Details"
width="350"
></e-column>
</e-columns>
<ng-template #rowTemplate let-data>
<tr>
<td class="border" style="padding-left:18px;">
<div>{{ data.EmpID }}</div>
</td>
<td class="border" style="padding: 10px 0px 0px 20px;">
<div style="font-size:14px;">
{{ data.Name }}
<p style="font-size:9px;">{{ data.Designation }}</p>
</div>
</td>
<td class="border" style="padding-left: 20px;">
<div>{{ format( data.DOB ) }}</div>
</td>
<td class="border">
<div>
<div style="position:relative;display:inline-block;">
<img
src="https://ej2.syncfusion.com/angular/demos/assets/treegrid/images/{{
data.FullName
}}.png"
alt="{{ data.FullName }}"
/>
</div>
<div style="display:inline-block;">
<div style="padding:5px;">{{ data.Address }}</div>
<div style="padding:5px;">{{ data.Country }}</div>
<div style="padding:5px;font-size:12px;">{{ data.Contact }}</div>
</div>
</div>
</td>
</tr>
</ng-template>
</ejs-treegrid> -->
<!-- Row - Detail template -->
<!-- <ejs-treegrid [dataSource]="data" width="auto" height="580" childMapping="Children">
<e-columns>
<e-column field="Name" headerText="First Name" width="160"></e-column>
<e-column
field="DOB"
headerText="Date of Birth"
width="150"
type="date"
format="yMd"
></e-column>
<e-column
field="Designation"
headerText="Designation"
width="180"
></e-column>
<e-column field="Country" headerText="Country" width="148"></e-column>
</e-columns>
<ng-template #detailTemplate let-data>
<div>
<div class="imageAlignment">
<img
src="https://ej2.syncfusion.com/angular/demos/assets/treegrid/images/{{
data.FullName
}}.png"
alt="{{ data.FullName }}"
/>
</div>
<div class="descriptionAlignment">
<div style="word-wrap: break-word;">
<b>{{ data.Name }}</b> was born on {{ format(data.DOB) }}. Now lives
at {{ data.Address }}, {{ data.Country }}. {{ data.Name }} holds a
position of <b>{{ data.Designation }}</b> in our WA department,
(Seattle USA).
</div>
<div style="word-wrap: break-word;margin-top:5px;">
<b style="margin-right:10px;">Contact:</b>{{ data.Contact }}
</div>
</div>
</div>
</ng-template>
</ejs-treegrid> -->
<!-- Column template -->
<!-- <ejs-treegrid
[dataSource]="data"
width="auto"
height="610"
childMapping="Children"
>
<e-columns>
<e-column headerText="Employee Image" width="150">
<ng-template #template let-data>
<img
src="https://ej2.syncfusion.com/angular/demos/assets/treegrid/images/{{
data.FullName
}}.png"
alt="{{ data.EmpID }}"
/>
</ng-template>
</e-column>
<e-column field="Name" headerText="Employee Name" width="150"></e-column>
<e-column
field="DOB"
headerText="Date of Birth"
width="150"
format="yMd"
></e-column>
<e-column
field="Designation"
headerText="Designation"
width="180"
></e-column>
<e-column field="Country" headerText="Country" width="148"></e-column>
</e-columns>
</ejs-treegrid> -->
<!-- Column rendering based on Conditional template and ValueAccessor -->
<ejs-treegrid
[dataSource]="data"
[treeColumnIndex]="1"
childMapping="subtasks"
height="610"
>
<e-columns>
<e-column
field="taskID"
headerText="Task ID"
textAlign="Right"
width="90"
></e-column>
<e-column
field="taskName"
headerText="Task Name"
textAlign="Left"
width="180"
></e-column>
<e-column
field="startDate"
headerText="Start Date"
textAlign="Right"
format="yMd"
width="90"
></e-column>
<e-column headerText="Approved" width="150" textAlign="Center">
<ng-template #template let-data>
<div *ngIf="data.approved; else elseblock">
<input type="checkbox" checked />
</div>
</ng-template>
<ng-template #elseblock>
<input type="checkbox" />
</ng-template>
</e-column>
<e-column
field="progress"
headerText="Progress"
textAlign="Right"
width="80"
[valueAccessor]="percentageFormatter"
></e-column>
</e-columns>
</ejs-treegrid>