PDA

View Full Version : Ext.form.NumberField decimal places



cwells
21 Sep 2007, 10:26 AM
Since upgrading to 1.1.1, some of my grids are displaying NumberFields incorrectly. I'm using them to store phone numbers (no hyphens or parentheses, just digits). Since the upgrade, they now automatically assume a precision of 2 decimal places. I found the relevant information in the documentation and tried to change this behaviour, but the following continues to display a decimal point followed by two zeros:



{ header: "Forwarding #",
dataIndex: 'forwarding_number',
width: 100,
editor: new Ed ( new fm.NumberField ( {
maxValue: 9999999999,
minValue: 1000000000,
allowBlank: true,
allowDecimals: false,
allowNegative: false,
decimalPrecision: 0,
minText: 'Number is too short',
maxText: 'Number is too long'
} ) )


Any suggestions?

cwells
21 Sep 2007, 10:56 AM
Please disregard. The changes worked, but because there is additional logic that refreshes the grid at intervals that was feeding the old data back into the grid (it first rejected the change since it didn't appear to be a change [9999999999.00 == 9999999999] then in turn refreshed the unchanged data back into the grid). Changing it to blank then to the correct number worked fine.

Sorry for the noise.