Can anybody tell me how to round a float value in extjs4.1? For example, if I have the value 24.536, I need to round it to 24.54. If I have 24.534, I need to round it to 24.53.
If you realy want round number, use it:
number = Math.round(number * 100) / 100;
If you want show rounded number - you may use ExtJs numbe format tools. Try this:
//Set these once, right after Ext.onReady
Ext.util.Format.thousandSeparator = ' ';
Ext.util.Format.decimalSeparator = '.';
//Then this should round your number correctly:
Ext.util.Format.number(12345.00, '0,000.00'); //output 12 345.67