I have a "number" column that has the following columnSettings:
- editorType: 'percent'
- editorOption: {displayFactor: 100, minDecimals: 4}
With the above settings, raw data from database (e.g. 12) was not formatted to 12.0000% as expected and 12 was shown on the UI instead.
Then I added column.format as 'percent' and the value was displayed as 0.12%.
So the PercentEditor options seems not taking any effect. I have attached the sample to show the problem. Please help on the expected display value.
Thanks!
Hi Erica,
The sample is working as expected and there is no problem with it. The problem which you describe is with displaying the data and not when you edit it. You should make difference between the two.
In case of igGridUpdating when user enters edit mode the column editor(s) are displayed and this is where the igGridUpdating.columnSettings take place. After user exits edit mode then igGrid re-renders the data. This is where format(columns.format), column formatter(columns.formatter) and template(columns.template) take place.
You should either use formatter or template in order to display the data as you expect.
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Thanks for pointing that out. It works with the formatter.