PDA

View Full Version : [Solved] record.get() for float value



giehl
8 Jun 2011, 11:08 PM
Im using this code at select listener to change kretep value,
but its value become int even if at table, that value is float.
How do I can change it to float?


,listeners: {
select: function(combo, record) {
var kretep = Ext.getCmp('kretep3');
kretep.setValue(record.get('mr_kredit'));
}Thanks for advice :)

fay
9 Jun 2011, 3:58 AM
I assuming that you've defined mr_kredit as type float in the record's definition? Also, is kretep3 a NumberField? And you haven't accidentally specified allowDecimals (http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.form.NumberField&member=allowDecimals) as false?

giehl
9 Jun 2011, 4:17 AM
Oh thanks.... I forgot to defined mr_kredit as type float in the record's definition