我有一个树存储,我想更新其子节点数据。
我的树节点看起来像这样
{
"items": [
{
"id": 0,
"ContactName": "Aanitha Ps",
"PhotoURL": "http://www.winreo.net/abraham/Images/avatar.svg",
"items": [
{
"Note": true,
"FollowUp": true,
"leaf": true,
"Email": "[email protected]",
}
]
}
}
我可以这样在根节点中进行更新
record=Ext.getStore('Contactsstore').getAt(0);
record.set('ContactName', 'John');
但是不在子节点中。.如何更新子节点中的电子邮件字段?请帮助我解决此问题,在此先感谢
我已经解决了
更新子节点
Ext.getStore('Contactsstore').getAt(1).getChildAt(0).set('Email','contactemail');
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句