如何添加到 extjs 4 中组合框的存储?
我已经从各种示例中尝试了以下操作,但没有一个起作用:
folderCombo.store.add({text: 'All', value: 'ALL'});
folderCombo.getStore.add({text: 'All', value: 'ALL'});
folderCombo.getStore().add(new grid.store.recordType({text: 'All', value: 'ALL'}));
folderCombo.store().add(new grid.store.recordType({text: 'All', value: 'ALL'}));
folderCombo.getStore().add(folderCombo.getStore().recordType({text: 'All', value: 'ALL'}));
其中folderCombo是我的组合框。如果我 console.logfolderCombo.store 它显示当前商店,但不会显示带有我尝试在上面添加的额外数据项的商店。
请指教。
I have tried the following from various examples and none of them work:
folderCombo.store.add({text: 'All', value: 'ALL'});
folderCombo.getStore.add({text: 'All', value: 'ALL'});
folderCombo.getStore().add(new grid.store.recordType({text: 'All', value: 'ALL'}));
folderCombo.store().add(new grid.store.recordType({text: 'All', value: 'ALL'}));
folderCombo.getStore().add(folderCombo.getStore().recordType({text: 'All', value: 'ALL'}));
Where folderCombo is my combobox. If I console.log folderCombo.store it shows the current store but never the store with the extra data item I try to add above.
Please advise.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
或:
Try:
or: