Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/410.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在ExtJS gridpanel中,如何使用ChainedStore和widgetcolumn显示每行中具有不同值的组合框_Javascript_Extjs_Combobox_Extjs5_Extjs6 - Fatal编程技术网

Javascript 在ExtJS gridpanel中,如何使用ChainedStore和widgetcolumn显示每行中具有不同值的组合框

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还可以有一列,其中包含使

在ExtJS5和6中,存储是源存储的“视图”。链式存储可以独立排序和筛选,而不会对源存储产生任何影响

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
}
}