Sridhar Sridhar - 1 year ago 139
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',

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download