Invalid Number in ag grid

here i m crearly passing “-” in place of NaN and its working. but for some reason and for some columns ag grid gets “Invalid Number” in some columns as its getting valueFormatter as “Invalid Number”. for the column which is displaying “-” it gets valueformatter as “null”.


image

Hello @Vaishali,

This is because in v31, the grid started inferring data types. This one is inferring that your column is numbers, which looks to be accurate.

To override, you can put cellDataType: “text” in the column definition. Or turn off inferred data types on the whole grid.

You might also be able to use a valueFormatter instead of having your df give -.

valueFormatter: {“function”: “params.value ? params.value : ‘-‘“}
3 Likes