Sencha Touch 2: Insert into TreeStore/NestedList

若如初见. 提交于 2019-12-05 08:09:16

The default display field for leaf items is "text". You can get the information from here. If you want to use "text" as display field, then you need to change this line to

customerAreaNode.appendChild({text: "text", leaf:true});

Or you can change your nested list's display field, so your model do not need to change for this time.

yournestedlist.setDisplayField('name');

Hope this helps.

In my case i used to update root and child nodes like the following way

Ext.getStore('Contactsstore').getAt(1).getChildAt(0).set('Email',contactemail);    
Ext.getStore('Contactsstore').getAt(1).set('ContactTitle',contacttitle);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!