Does ng-grid supports cell filter (angular filter) by row

Jhankar Mahbub picture Jhankar Mahbub · Jun 7, 2014 · Viewed 9.1k times · Source

ng-gird colDefs (column Definition) allows you to define a filter (angular filter) for each column.

In my use case, I need to use filter per row. This means, data in some rows will have number format and other might have percentage.

Does ng-grid supports filter per row? Please note, this is not filtering rows, this is applying same display format to the cells of a row.

Answer

kamituel picture kamituel · Aug 21, 2014

This is now (as of 2014) possible natively with the current ngGrid:

columnDefs: [
  {
    field: 'name',
    cellFilter: 'lowercase'
  }
]

Or even with the filter arguments:

columnDefs: [
  {
    field: 'name',
    cellFilter: 'currency:"GPB"'
  }
]