Tony Tony - 3 months ago 54x
AngularJS Question

How to format a number value in AngularJS ui-grid cell to two decimal?

I'm using Angularjs ui-grid and using the default settings, the question is how can I format the numbers to two decimal?

enter image description here


You can use the columnDefs cellFilter option:

columnDefs: [
    field: 'name',
    cellFilter: 'number: 2'