道场树状网格有等级限制吗?
在过去的几天里,我一直在尝试使用森林模型让树形网格正常工作。在我看来,使用以编程方式创建的树形网格可以显示的级别数量是有限的。 我修改了dojo的“dojox/grid/tests/test_treegrid_model2.html”,一旦我在“Ottwa”下添加另一个级别,我得到一个“dojo.data.ItemFileReadStore:无效的项目参数”。错误。
... { id: 'CA', name:'加拿大', type:'国家', 人口:'3300万', 面积:'9,984,670 平方公里', 孩子们:[{_reference:'渥太华'}, {_reference:'多伦多'}]}, { id: '渥太华', name:'渥太华', type:'城市', 人口:'90万', 时区:'-5 UTC', 孩子们:[{_reference:'渥太华1'}]}, { id: 'Ottawa1', name:'Ottawa1', type:'city1', 人口:'90万', timezone:'-5 UTC'}, ...
如果我将这两个新城市添加到加拿大,效果就很好。 ... { id: 'CA', name:'加拿大', type:'国家', 人口:'3300万', 面积:'9,984,670 平方公里', 孩子们:[{_reference:'渥太华'}, {_reference:'多伦多'}, {_reference:'渥太华1'}, {_reference:'渥太华2'}] }, { id: '渥太华', name:'渥太华', type:'城市', 人口:'90万', timezone:'-5 UTC'}, { id: 'Ottawa1', name:'Ottawa1', type:'city1', 人口:'90万', timezone:'-5 UTC'}, { id: 'Ottawa2', name:'Ottawa2', type:'city1', 人口:'90万', timezone:'-5 UTC'}, ...
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我正在回答我自己的问题,希望对其他人有用。这是一个已确认的bug,该bug修复计划在1.6版本中发布。但是如果你查看最新的主干(http://svn.dojotoolkit.org/src/),并更新你的 TreeGrid.js,它应该可以解决问题。
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.