ng-template not working on ejs-treegrid

<div class="control-section mb-1 ml-1 mr-1 mt-1">
    <ejs-treegrid #grid [dataSource]='objectsData' 
    enableCollapseAll='true' 
    gridLines='Both'
    [selectionSettings] = 'selectionOptions'
    (click)="clickaction($event)"
    height='400'
     >
        <e-columns>
            <e-column field='Name' headerText='Name' width='90'></e-column>
            <e-column field='Tags' headerText='Tags' width='90'></e-column>
            <e-column field='Type' headerText='Type' width='90'></e-column>
            <e-column field='Description' headerText='Description' width='90'></e-column>
            <e-column  width='90' headerText="ABC" >
                <ng-template #template>

                    <ejs-dropdown></ejs-dropdown>

                </ng-template>

            </e-column> 

1 Reply

RR Rajapandi Ravi Syncfusion Team November 25, 2019 09:52 AM UTC

Hi Kunal, 

Thanks for using syncfusion support. 

From validating your query, we suspect that you try to render the dropdown component but you defined component as ‘<ejs-dropdown>’ which is wrong. Please use this <ejs-dropdownlist> selector to render the component. Please refer the below code example and sample for more information. 

<ejs-grid (actionBegin)='actionBegin($event)' [dataSource]='data' allowPaging='true' [editSettings]='editSettings' [toolbar]='toolbar' height=365 [pageSettings]='initialPage'> 
        <e-columns> 
            .  .  .  .  .  .  .  . 
            <e-column field='ShipCountry' headerText='Ship Country' width='170'> 
              <ng-template #editTemplate let-data> 
                    <ejs-dropdownlist id='ShipCountry' [dataSource]='ddldata' placeholder="ShipCountry" [(ngModel)]="orderData.ShipCountry" floatLabelType='Never'></ejs-dropdownlist> 
                        </ng-template> 
            </e-column> 
        </e-columns> 
    </ejs-grid> 


Regards, 
Rajapandi R

Loader.
Up arrow icon