Hi Aditya Murthy,
Greetings from Syncfusion support.
You can update the value of DropdownTree using value property of DropdownTree component by using dialog open event.
Please, refer the below code snippet.
|
<ejs-dialog
#alertDialog
[visible]="hidden"
[showCloseIcon]="true"
[target]="target"
[width]="alertWidth"
(open)="dialogOpen()"
>
<ng-template #header>
<div title="Nancy">DropdownTree component</div>
</ng-template>
<ng-template #content>
<ejs-dropdowntree
id="multiselect"
#dropdownTree
[fields]="field"
[allowMultiSelection]="allowMultiSelection"
popupHeight="220px"
placeholder="Select items"
></ejs-dropdowntree>
</ng-template>
</ejs-dialog>
dialogOpen() {
this.dropdownTree.value = ["6"];
} |
Since, parent element (Dialog) of DropdownTree will be in hidden state until opening it. DropdownTree will be in hidden state. So when initializing it, Value won't update properly in DropdownTree.
You need to assign the value to the DropdownTree component on Dialog open event.
Please, refer the sample link below.
Please let us know, if you need any further assistance.
Regards,
Sowmiya.P