Refreshing Icons - Error MSG

I am trying to refresh the treegrid icons which worked and for some reason just stopped working.

My code is below.

treeGrid.updateFromXML(“userxml.aspx”, false, false, function(){

//Refresh the icons after a user has been enabled

treeGrid._h2.forEachChild(0, function(el) {

var cell = treeGrid.cells(, data[1]);




I get the following error message “Microsoft JScript runtime error: ‘childNodes’ is null or not an object” at the below code location in dhtmlxgrid.js.

cells:function(row_id, col){

        if (arguments.length == 0)

            return this.cells4(this.cell);


            var c = this.getRowById(row_id);

        var cell = (c._childIndexes ? c.childNodes[c._childIndexes[col]] : c.childNodes[col]);

        return this.cells4(cell);

Such error can occurs in next situation
- non-unique IDs used in TreeGrid
- 0 was used as ID for some element
- incorrect cell index provided for cells command

The last one may be related to the next line
>>var cell = treeGrid.cells(, data[1]);
be sure that data[1] - is a valid index value

I just commented out the jquery library and it works as it should. Have you have experience using the jquery library with dhtmlx?


it seems that jquery doesn’t redefine anything. So, it can’t cause such a problem.

You can provide a complete that allows to re-create the issue. We’ll try to help.

I found the issue. The issue is when the treegrid is not fully expanded and I try to perform a call, I get a null or object expected error msg. When I have the treegrid fully expanded, it works as it should. How do I correct this?

Such issue occurs because of while performing some methods expected object is not loaded yet. You should wait till treeGrid fully expanded.