Sridhar Sridhar - 5 months ago 55
AngularJS Question

ui grid Filter and sorting not working when cellTemplate used

I am using

where some of the columns are populated with
. It populates the value correctly, but the sorting and filtering is not working. Do I need to do anything with the sorting/filtering logic ?

Issue is recreated @ Plnkr , both Age and Balance columns sorting and filtering is not working.

this.grdColDefs = [
name: 'Age',
width: 90,
cellTemplate: '<div class="ui-grid-cell-contents">{{grid.appScope.calcAge(row.entity)}}</div>',
headerCellClass: 'my-cell-header',


Issue resolved when I use field to point to the model.