This is probably the last obstacle in development process, so any kind of help be much appreciated, as soon as possible.
I am using Ag-Grid to display different columns. Columns are fully dynamic – meaning I don’t know how many of them, or what type it will be.
I need to format all numbers to be shown like this:
10,123,456.78
Also, value, has to stay a number, in order to use filter with intended options (Less, Greater, Between, etc.)
What I tried:
`defaultColDef: ColDef = {
flex: 1,
filter: true,
editable: true,
floatingFilter: true,
valueFormatter: (params) => {
return typeof params.value === ‘number’ ? params.value.toLocaleString(‘en-US’, { style: ‘decimal’ }) : params.value;
}
}`
Strahinja Veljovic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.