Hi Marwa,
Thanks for the update.
In your sample, resource option is used but in editor template, resource field is not added which is the cause. We have prepared the below sample and refer the UG link.
<e-resources>
<e-resource field="OwnerId" title="Owner" name="Owners" [dataSource]="ownerDataSource" textField="text" idField="id" colorField="color">
</e-resource>
</e-resources>
<tr>
<td class="e-textlabel">Owner</td>
<td colspan="4">
<input type="text" id="OwnerId" name="OwnerId" class="e-field" style="width: 100%" />
</td>
</tr>
onPopupOpen(args: PopupOpenEventArgs): void {
if (args.type === 'Editor') {
let startElement: HTMLInputElement = args.element.querySelector('#StartTime') as HTMLInputElement;
if (!startElement.classList.contains('e-datetimepicker')) {
new DateTimePicker({ value: new Date(startElement.value) || new Date() }, startElement);
}
let endElement: HTMLInputElement = args.element.querySelector('#EndTime') as HTMLInputElement;
if (!endElement.classList.contains('e-datetimepicker')) {
new DateTimePicker({ value: new Date(endElement.value) || new Date() }, endElement);
}
let processElement: HTMLInputElement = args.element.querySelector('#OwnerId');
if (!processElement.classList.contains('e-multiselect')) {
let multiSelectObject: MultiSelect = new MultiSelect({
placeholder: 'Choose a owner',
fields: { text: 'text', value: 'id' },
dataSource: <any>this.ownerDataSource
});
multiSelectObject.appendTo(processElement);
}
}
}
Regards,
Karthi