Hi
Datagrid is not allowing sorting,When ng-template is used to display columns data,My app code is
as below
<ejs-grid #dt [dataSource]="gridData" [allowReordering]='allowReorder' (columnDrop)="onColumnReorder($event)"
allowSorting="true">
<e-column *ngFor="let column of gridColumns" headerText="{{column.header | translate}}"
[textAlign]='column.textAlign' [isPrimaryKey]='column.isPrimaryKey !== undefined ? column.isPrimaryKey : false'
[visible]="column.visible !== undefined ? column.visible : true" [width]='column.width' [format]="column.format"
[editType]="column.editType" [edit]="column.edit" [defaultValue]="column.defaultValue?column.defaultValue:null"
[allowEditing]="column.allowEditing !== undefined ? column.allowEditing : true"
[allowResizing]='column.allowResizing !== undefined ? column.allowResizing : true'>
<!--[field]='column.field'-->
<ng-template #template let-rowData>
{{rowData[column.field]}}
</ng-template>
</e-column>
</e-columns>
</ejs-grid>