从 json.id 为 32323 的商店中选择 json.email?
该语句不会位于该网格、回调、选择等下方,而是位于完全不同的位置。
我已经尝试过:
rowsSelected = isemriGrid.getSelectionModel().getSelections();
aRecord = rowsSelected[0];
console.log(aRecord.get('EMAIL')); //prints undefined
我认为它不会打印,因为 EMAIL 未在网格中定义。
我可以拿到身份证。使用 ID,我可以从 store/json 获取 EMAIL 吗?
The statement will not be under that grid, callback, selection etc. But in a complete different place.
I have tried:
rowsSelected = isemriGrid.getSelectionModel().getSelections();
aRecord = rowsSelected[0];
console.log(aRecord.get('EMAIL')); //prints undefined
I think it doesn't print because EMAIL is not defined in the grid.
I can get the ID. Using the ID, can I get the EMAIL from the store/json?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当然,您只想要这样的内容:
假设您从网格中获得的行包含一个名为电子邮件的数据字段。
如果您没有在行中定义电子邮件,并且想要从商店获取值,假设 aRecord.data.id = 12345(或您想要的任何 id),您可以使用以下内容:
这有帮助吗?
Surely you'd just want something like this:
Presuming that the row you've got from the grid contains a data field called email.
If you don't have the email defined in the row and you want to get the value from the store, assuming aRecord.data.id = 12345 (or whatever id you want), you'd use the following:
Does that help?