Hi!
1. I delete the last row under a node in a treegrid.
2. After this when calling getChangedRows() I get this JavaScript error:
"…childNodes.length is null or not an object…"
The debugger shows:
function(id){var row = this.rowsAr[id];
var cols = row.childNodes.length; (error here)
for (var j = 0;j < cols;j++)
Is there some known issues with getChangedRows in treegrid? Do you need more code?
In grid which is not tree, it works fine.
Cheers,
/Hans
There is no known issues which may cause such problem.
Please be sure that
- you are using unique IDs for each row
- you not using such ID as 0, false, null
If above rules fulfilled and error still occurs - please provide info, which version of dhtmlxTreeGrid you are using
Hi,
Actually as it turned out, deleting a row was not required to get the error. Calling getChangedRows anytime after init produces the same error.
I am using dhtmlxSuite_2008Rel3_pro_81009.
Here is the xml, please check if there are any errors in that.
Cheers,
/Hans
<?xml version="1.0" encoding="UTF-8" ?>
<cell image="blank.gif">Line Item</cell>
<cell>[ORDERNUMBER]_[SITE]_[PRODUCT]_[SIZE]</cell>
<cell>CPM</cell>
<cell>100000</cell>
<cell>14/12/2008</cell>
<cell>21/12/2008</cell>
<cell>Running</cell>
<cell>53500</cell>
<cell image="blank.gif">Flight</cell>
<cell>[ORDERNUMBER]_[SITE]_[PRODUCT]_[SIZE]_1</cell>
<cell>CPM</cell>
<cell>80000</cell>
<cell>14/12/2008</cell>
<cell>21/12/2008</cell>
<cell>Running</cell>
<cell>21000</cell>
</row>
<cell image="blank.gif">Flight</cell>
<cell>[ORDERNUMBER]_[SITE]_[PRODUCT]_[SIZE]_2</cell>
<cell>CPM</cell>
<cell>20000</cell>
<cell>19/12/2008</cell>
<cell>20/12/2008</cell>
<cell>Running</cell>
<cell>32500</cell>
</row>
</row>
<cell image="blank.gif">Line Item</cell>
<cell>[ORDERNUMBER]_[SITE]_[PRODUCT]_[SIZE]</cell>
<cell>CPC</cell>
<cell>5000</cell>
<cell>16/12/2008</cell>
<cell>20/12/2008</cell>
<cell>On Hold</cell>
<cell>5000</cell>
<cell image="blank.gif">Flight</cell>
<cell>[ORDERNUMBER]_[SITE]_[PRODUCT]_[SIZE]_1</cell>
<cell>CPC</cell>
<cell>5000</cell>
<cell>16/12/2008</cell>
<cell>18/12/2008</cell>
<cell>On Hold</cell>
<cell>5000</cell>
</row>
</row>
</rows>
Problem confirmed
To fix it you can add next line to the grid’s init
grid.enableSmartXMLParsing(false)
or use updated js file instead of original one - sent by email.