I have a grid that I am displaying a column that is a composite field/object. The 'createdUser' field is an object with lastName and firstName properties (among others). The column is displaying properly, combining the lastName and firstName into a single column.
I would also like to group by that column. How would I group by the composite column (using both lastName and firstName)? Here is the column definition:
<kendo-grid-column field="createdUser" title="Created By"
[style]="{'font-weight': 'bold', 'line-height': '1em'}"
[headerStyle]="{'line-height': '1em'}">
<ng-template kendoGridGroupHeaderTemplate let-group let-field="field" let-value="value">
{{value.lastName}}, {{value.firstName}}
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem>
<span style="font-weight: bold;">{{ dataItem.createdUser.lastName }}, {{ dataItem.createdUser.firstName}}</span>
</ng-template>
</kendo-grid-column>
This displays properly, but everything is in a single group (when grouping). Probably due to the field='createdUser' being an object.
Any ideas on how to accomplish?
Thanks,
Tim