admin管理员组文章数量:1356345
I have the row data as below:
[{ordernum:'DD34345',item:{name:'pc',qty:88}}]
and I want an editor that can read and write the nested object 'item' property.
I know, I can do this by 'onBeginEdit' function to set the value and 'onEndEdit' function get the value and write it to the row data. But it is too complicated.
I want to modify the easyui resource code, or any other way to do this. When I define the column as:
{ field: 'item.qty', title: 'Quantity', width: 80, editor: { type: 'textbox' } }
it can read and write the field 'qty' of the nested object 'item'. If the nested object does not exist, when reading, then it returns an empty string.
When writing, then a new the nested object first and then set the value. And don't write the value to the row data as to:
[{ordernum:'DD34345','item.qty':88,item:{name:'pc',qty:88}}]
How to resolve my problem? Any help? Thanks in advance.
本文标签: How to edit nested object in jQuery easyuiStack Overflow
版权声明:本文标题:How to edit nested object in jQuery easyui? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743996883a2573151.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论