propery binding and event binding not working in ng-template under e-column

i have using template for a column 

          <e-column>
                <ng-template e-template let-data>
                    <div>
                        <span class="fa fa-edit" (click)="onEditClick(data)"></span>
                    </div>
                </ng-template>
            </e-column>

that click event is not binded. also if i use property binding there that is also not working.

this is my angular 

 "@angular/animations": "5.0.5",
    "@angular/common": "5.0.5",
    "@angular/compiler": "5.0.5",
    "@angular/core": "5.0.5",
    "@angular/forms": "5.0.5",
    "@angular/http": "5.0.5",
    "@angular/platform-browser": "5.0.5",
    "@angular/platform-browser-dynamic": "5.0.5",
    "@angular/router": "5.0.5",

this is my syncfusion

 "@syncfusion/ej2-base": "^15.4.23",
    "@syncfusion/ej2-data": "^15.4.23",
    "@syncfusion/ej2-ng-grids": "^15.4.24",

also there is no error in console. 


1 Reply

IR Isuriya Rajan Syncfusion Team March 16, 2018 12:35 PM UTC

Hi Subhash, 

Thanks for using Syncfusion products. 

We went through your code example that you have shared for us and found that EJ1 ng-template syntax for template column instead of EJ2 syntax. If we use column template in EJ2-Angular Grid then we need to mention the corresponding reference (#template) in ng-template code example like as follows, 
<e-column headerText='column template' width='150' textAlign='Center'> 
                <ng-template #template let-data> 
                     <div> 
                        <span class="fa fa-edit" (click)="onEditClick(data)">Click me</span> 
                    </div> 
                </ng-template> 
            </e-column> 

Please refer to the following online demo for more information, 
We have also prepared the Plunkr sample for your reference, 

Regards, 
  
Isuriya R 


Loader.
Up arrow icon