I have an Angular 5 application with the library Kendo UI. In this one, I have a Grid with sorting and template for some header cells.
The sorting works but if I used template (with span inside) for a header cell, the sorting works just if we click beside the span.
This is my html code :
<kendo-grid
#grid
[kendoGridBinding]="getDataService().listOfSolution"
[resizable]="false"
[pageSize]="10"
[pageable]="true"
[sortable]="true"
[filterable]="false"
[groupable]="false"
[reorderable]="false"
[selectable]="false"
[scrollable]="'none'"
[rowClass]="rowCallback()"
(detailCollapse)="onCollapse($event)"
(detailExpand)="onExpand($event)"
(sortChange)="onSort($event)"
style="border: none;">
<kendo-grid-column field="ThisOneWorks" title="ThisOneWorks"></kendo-grid-column>
<kendo-grid-column-group title="Group" [locked]="false">
<kendo-grid-column width="100px" field="pod.date" title="DATE" filter="date" [sortable]="true" [style]="{'min-width':'100px'}">
<ng-template kendoGridHeaderTemplate>
<span style="border-left:1px solid #E1E1E2;padding-left: 10px;">
DATE
</span>
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem>
<span style="border-left:1px solid #E1E1E2;padding-left: 10px;">
{{ dataItem.pod.date | date : "MM/dd/yyyy" }}
</span>
</ng-template>
</kendo-grid-column>
...
</kendo-grid>
So, for the date, the sorting works only if we click beside the span.
How can I do to sort the column by clicking everywhere in the cell, also on the span ?