Tony Tony - 1 year ago 306
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

Answer Source

You can use the columnDefs cellFilter option:

columnDefs: [
    field: 'name',
    cellFilter: 'number: 2'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download