Hi All,
I am new to ExtJs and using Extjs 4.1.1.
I have created a cellEditing grid with float values in one of the columns, where i want to round of numbers.
The renderer is
And the editor is
The problem is, even if i am not changing the value in the cell, it is showing the dirty flag.
I am new to ExtJs and using Extjs 4.1.1.
I have created a cellEditing grid with float values in one of the columns, where i want to round of numbers.
The renderer is
Code:
function change(value) {
var val = Ext.util.Format.number(value, '0,000');
if (value > 0) {
return '<span style="color:green;">' + val + '</span>';
} else if (value < 0) {
return '<span style="color:red;">' + val + '</span>';
}
return value;
}
And the editor is
Code:
editor: {
xtype: 'numberfield',
allowBlank: false,
allowDecimals:false
}
The problem is, even if i am not changing the value in the cell, it is showing the dirty flag.
I have reproduced the problem at http://ift.tt/1qyUOD0 and tested it. The problem exists there also. I do need to show dirty flag if value is changed, but not when user just clicks the cell, but do not change the value.
Thanks
Aucun commentaire:
Enregistrer un commentaire