PDA

View Full Version : 'Thousand Seperator & Point' Format for Numberfield in Grid Panel



nasim
Nov 15, 2015, 9:43 AM
If you have a Float type Number Field in your Grid Panel and you want numbers being displayed with both Thousand separator and Point on a grid you can use following code:
Upto Ext Version 2.4:


var NumericColumn = new SummaryColumn();
//On Summary Grid Column
NumericColumn.SummaryRenderer.Fn="Ext.util.Format.numberRenderer('0.000,0.');";

//On Grid Column
NumericColumn.Renderer.Fn="Ext.util.Format.numberRenderer('0.000,0.');";

for Ext Version 2.4 and above:


var NumericColumn = new SummaryColumn();
//On Summary Grid Column
NumericColumn.SummaryRenderer.Fn="Ext.util.Format.numberRenderer('0.0,000');";

//On Grid Column
NumericColumn.Renderer.Fn="Ext.util.Format.numberRenderer('0.0,000');";

Daniil
Jan 12, 2016, 6:44 AM
Hello Nasim,

Thank you very much for sharing that!