Javascript 在ExtJS gridpanel中,如何使用ChainedStore和widgetcolumn显示每行中具有不同值的组合框
在ExtJS5和6中,存储是源存储的“视图”。链式存储可以独立排序和筛选,而不会对源存储产生任何影响Javascript 在ExtJS gridpanel中,如何使用ChainedStore和widgetcolumn显示每行中具有不同值的组合框,javascript,extjs,combobox,extjs5,extjs6,Javascript,Extjs,Combobox,Extjs5,Extjs6,在ExtJS5和6中,存储是源存储的“视图”。链式存储可以独立排序和筛选,而不会对源存储产生任何影响 var mySourceStore = Ext.create('Ext.data.Store', { fields: ['id', 'name'] }); var myChainedStore = Ext.create('Ext.data.ChainedStore', { source: mySourceStore }); 此外,gridpanels还可以有一列,其中包含使
var mySourceStore = Ext.create('Ext.data.Store', {
fields: ['id', 'name']
});
var myChainedStore = Ext.create('Ext.data.ChainedStore', {
source: mySourceStore
});
此外,gridpanels还可以有一列,其中包含使用的组合框
我需要的是每一行都有另一个链式存储实例。根据行中的其他值,将过滤存储的链接。实际上,每行中的组合框可能会显示一组不同的值
使用小部件列和链接存储来实现这一点是一种好方法吗?这样的解决方案会是什么样子
PS:为了记录在案,我还发现了其他一些类似的方法:
{
xtype: 'widgetcolumn',
text: 'all combos',
widget: {
xtype : 'combobox',
store : Ext.create('Ext.data.ChainedStore'),
valueField : 'id',
displayField : 'name',
forceSelection: true
}
}您可以使用以下方法创建存储实例:
{
xtype: 'widgetcolumn',
text: 'all combos',
widget: {
xtype : 'combobox',
store : Ext.create('Ext.data.ChainedStore'),
valueField : 'id',
displayField : 'name',
forceSelection: true
}
}