简体   繁体   English

带有可编辑组合框列的extjs网格

[英]extjs grid with editable combobox column

I am using Ext.grid.EditorGridPanel to get some input from user. 我正在使用Ext.grid.EditorGridPanel从用户那里获取一些输入。 One of the columns is a combobox, user can select any value from the dropdown list or can provide a new value. 列之一是组合框,用户可以从下拉列表中选择任何值,也可以提供新值。 This is the relevant part of the column model 这是列模型的相关部分

{
    header: 'value',
    dataIndex: 'value',
    width: 90,
    align: 'right',
    editor: new fm.ComboBox({
        typeAhead: true,
        triggerAction: 'all',
        store: selected_columns_store,
        displayField:'attr',
        minListWidth: 300,
        mode: 'local',
        triggerAction: 'all',
        emptyText:'Select an attribute...',
        selectOnFocus:true
    })
}

I dont see any issue when user uses one of the values from dropdown list. 当用户使用下拉列表中的值之一时,我看不到任何问题。 What happens when user provides a new value is, all items in the store selected_columns_store gets deleted. 用户提供新值时会发生的事情是,存储区selected_columns_store中的所有项目都将被删除。 Appreciate any help in fixing this 感谢解决此问题的任何帮助

they don't get deleted... they just get filtered, you should use clearFilter() method on the store. 它们不会被删除...只是被过滤,您应该在商店上使用clearFilter()方法。 Glad to be helpful 很高兴能有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM