Hello,
Please refer to the following examples: http://jsfiddle.net/k3Lx2v73/4/ is in 15.1 and http://jsfiddle.net/uofcft8z/4/ is in 16.2. Hit the "Add new row" button in 16.2 and an uncaught exception occurs ("Uncaught RangeError: toFixed() digits argument must be between 0 and 20"). This appears to be a result of setting the defaultValue field. I tried a few different methods for setting this (string, decimal, etc), but was unable to get the defaultValue to work properly in 16.2. Please advise.
Thanks,
Paul
Hello Paul,
Thank you for providing this feedback. I will inform the team responsible for this control to remove "decimal" value for the dataMode option in MVC Wrapper.
Thank you for using Infragistics controls.
Hi Vasya,
Thanks for the update. Changing this to a double worked nicely. We are building this grid through through MVC and I would recommend that you remove this as an option from the NumericEditorDataMode enum if it is no longer valid.
updatingSetting.NumericEditorOptions.DataMode = NumericEditorDataMode.Decimal;
Thank you for posting in our community.
Valid data mode for numeric editor`s dataMode options is double (what is set in the fiddle provided is decimal). Change this option in the Updating column settings and everything works as expected. For example:
{ name: "Updating", editMode: "dialog", enableAddRow: true, columnSettings: [ { columnKey: "ImageUrl", readOnly: false }, { columnIndex: -1, columnKey: 'InStock', editorType: 'numeric', defaultValue: 0, required: true, editorOptions: { dataMode: 'double', textAlign: 'right', validatorOptions: { required: { errorMessage: 'This field is required.' }, onblur: true }, minDecimals: 10, maxDecimals: 10, maxValue: 99999999 }, validation: true } ] }
A list with all valid values for dataMode option could be found in our API documentation:
http://www.igniteui.com/help/api/2016.2/ui.ignumericeditor#options:dataMode
Your modified fiddle is available at the following link:
http://jsfiddle.net/uofcft8z/7/
Please let me know if you need any further assistance with this matter.