PDA

View Full Version : ExtJS Grid on refresh



Ronits
16 Jan 2014, 10:33 PM
Hi,
I am facing a typical problem related to thousands separator formatting in grid.
I do not have any formatter placed in ExtJS grid column renderer , neither I am formatting it in Java layer.
However, in one scenario, when I am creating the grid using Ext.create(), upon debug, I found that when extjs internally calls the refresh() , it appends a thousand separator to one of the columns.
I have no clue as to from where it is getting the instruction to add the thousands separator. Please help.

PFB the images:
4761347614

scottmartin
17 Jan 2014, 7:14 AM
Can you duplicate this using this example:

You can paste the code in our fiddle:
https://fiddle.sencha.com/#home



Ext.onReady(function () {

Ext.create('Ext.data.Store', {
storeId : 'simpsonsStore',
fields : ['name', 'email', 'change'],
data : {'items' : [
{ 'name' : 'Lisa', 'email' : 'lisa@simpsons.com', 'change' : 2100 },
{ 'name' : 'Bart', 'email' : 'bart@simpsons.com', 'change' : 1000 },
{ 'name' : 'Homer', 'email' : 'homer@simpsons.com', 'change' : 2350 },
{ 'name' : 'Marge', 'email' : 'marge@simpsons.com', 'change' : 1100 }
]},
proxy : {
type : 'memory',
reader : {
type : 'json',
root : 'items'
}
}
});

Ext.create('Ext.grid.Panel', {
title : 'Simpsons',
store : Ext.data.StoreManager.lookup('simpsonsStore'),
selModel : {
selType: 'cellmodel'
},
columns : [
{ header : 'Name', dataIndex : 'name' },
{ header : 'Email', dataIndex : 'email' },
{ header : 'Change', dataIndex : 'change' }
],
height : 200,
width : 400,
renderTo : Ext.getBody()

});

});