PDA

View Full Version : EXTJS 4.1.3 CellEditor Uncaught TypeError: Cannot read property 'addCls' of null



adp-gmt
23 Aug 2016, 3:07 AM
Hello,
could you help me to solve this problem?
https://fiddle.sencha.com/#fiddle/1fkt

Scenario:
Step 1 : Click on "Show Employees"
Step 2 : Click on the grid cell to edit the field
Step 3 : Click on "Show Employees"
Step 4 :Click on the grid cell to edit the field and you will receive the following error
54998

Why?

Jad
24 Aug 2016, 1:53 AM
Hy

like that it's work
var cols = [{text: 'Code',dataIndex: 'CODE',editor : {}}];

adp-gmt
24 Aug 2016, 2:22 AM
Merci Jad but you bypass the problem.
I need to set an editor.

For example if I need to edit a number, I will replace
var cols = [{text: 'Code',dataIndex: 'CODE',editor :Ext.create({xclass:'Ext.form.field.Text'})}]; by
var cols = [
{
text: 'Code',dataIndex: 'CODE'
,editor : Ext.create({
xclass:'Ext.form.field.Number'
,selectOnFocus:true
,fieldStyle:{'text-align':'right'}
,decimalPrecision:2
,decimalSeparator : ','
,maxLength:12
,enforceMaxLength:true
,minValue:0
})
,'renderer':function(pValue,pMetaData,pModel,pRowIndex,pColIndex,pStore){
return Ext.util.Format.number(pValue,'000,000,000.00')
}
}
]; and the problem persists

Jad
24 Aug 2016, 2:27 AM
Use xtype not xclass