Search code examples
dojotreegrid

Is there a level limit in dojo treegrid?


I've trying to get the treegrid using forestmodel to work the last several days. It seems to me that there is a limit to the number of level can be displayed using programmatically created treegrid. I modified dojo's "dojox/grid/tests/test_treegrid_model2.html", once I add another level under "Ottwa", I got a "dojo.data.ItemFileReadStore: Invalid item argument." error.

... { id: 'CA', name:'Canada', type:'country', population:'33 million', area:'9,984,670 sq km', children:[{_reference:'Ottawa'}, {_reference:'Toronto'}]}, { id: 'Ottawa', name:'Ottawa', type:'city', population:'0.9 million', timezone:'-5 UTC', children:[{_reference:'Ottawa1'}]}, { id: 'Ottawa1', name:'Ottawa1', type:'city1', population:'0.9 million', timezone:'-5 UTC'}, ...

If I add the 2 new cities to Canada, it works just fine. ... { id: 'CA', name:'Canada', type:'country', population:'33 million', area:'9,984,670 sq km', children:[{_reference:'Ottawa'}, {_reference:'Toronto'}, {_reference:'Ottawa1'}, {_reference:'Ottawa2'}] }, { id: 'Ottawa', name:'Ottawa', type:'city', population:'0.9 million', timezone:'-5 UTC'}, { id: 'Ottawa1', name:'Ottawa1', type:'city1', population:'0.9 million', timezone:'-5 UTC'}, { id: 'Ottawa2', name:'Ottawa2', type:'city1', population:'0.9 million', timezone:'-5 UTC'}, ...

Is there a limit to the number of level can be displayed in TreeGrid? Thanks,

David


Solution

  • OK, I'm answering my own question, and hopefully it'll be useful for other people. It is a confirmed bug, the bug fix is scheduled to be released with 1.6. But if you check out the most recent trunk(http://svn.dojotoolkit.org/src/), and just update your TreeGrid.js, it should fix the problem.