1 person found this helpful
It doesn't look like you are assigning the result of the format method to anything. Only the result holds the formatted value, so you need code like this:
araycoll[i][DGColumn.columnName] = Number(nf.formatDecimal(String(araycoll[i][DGColumn.columnName])));
You may also want to look at the DataGridColumn's labelFunction property for performing formatting operations.
But when i do that it gives me a NaN for all those cells which has decimal values and Unchanged values for without decimal i.e. absolute ones.
araycoll[i][DGColumn.columnName] = Number(nf.formatDecimal(String(araycoll[i][DGColumn.columnName]))); -->> gives a NaN.
In my case i dont think i can use labelfunction.
i removed Number() .
asn assigned it as String only.
But in that case my column sorting went away. Any insights williams i can regain that custom numeric sorting.
Use DataGridColumn's labelFunction instead of manipulating the data itself.