javascript - Can not read property 'mergeAttributes' of null error when I try to insert new records using extjs grid editor -


first of all, using 6.2 version of extjs framework.

i'm facing problem save new records using ext.js grid "ext.grid.plugin.rowediting" plugin.

when try save record, since line not have combobox in editor, works fine.

however, when add combobox in the line editor, following error occurs:

can not read property 'mergeattributes' of null

by checking extjs framework code, noticed error occurs when editor exiting , line being populated modified content.

this occurs in following section of table.js file:

    cellselector = me.getcellselector(column);     oldcell = oldrow.selectnode(cellselector);     newcell = newrow.selectnode(cellselector);      // copy new cell attributes across. use ie-specific method if possible.     if (oldcell.mergeattributes) {         oldcell.mergeattributes(newcell, true);     } else {         newattrs = newcell.attributes;         attlen = newattrs.length;         (attrindex = 0; attrindex < attlen; attrindex++) {             attname = newattrs[attrindex].name;             if (attname !== 'id') {                 oldcell.setattribute(attname, newattrs[attrindex].value);             }         }     } 

basically, variable "oldcell" not being populated "oldrow.selectnode (cellselector)".

in first column put invisible column containing id of record. cell being filled, however, other cell, having combobox or not, returning "oldcell" null.

just enforce, when remove comboboxes editor works.

this true new records.

luckily bug easy fix.

i have "render" in column combobox placed.

an unhandled error occurring in render. so, corrected , bug disappeared.


Comments