如何阻止ExtJS清除网格中的组合框?

时间:2011-10-05 15:06:13

标签: combobox extjs4

我在GridPanel中有ExtJS 4.02,其中包含一个组合框列。

我也在使用RowEditor。网格呈现正常,但当我点击任何一行时,组合变为空白。即使用户没有更改组合,用户也必须记住之前的值。非常烦人。

这是我的专栏:

    {
        dataIndex:  'partnumber',
        editor:     self.cmbParts,
        field: {
           allowBlank:       false,
           autoRender:       false,
           autoSelect:       false,
           autoShow:         false,
           dataIndex:        'id',
           displayField:     'display',
           editable:         true,
           emptyText:        'Select a part',
           enableKeyEvents:  true,
           forceSelection:   true,
           listClass:        'x-combo-list-small',
           listWidth:        500,
           msgTarget:        'side',
           preventMark:      true,
           queryMode:        'local',
           readOnly:         false,
           selectOnFocus:    false,
           selectOnTab:      false,
           store:            stoPartsDropDown,
           title:            'Select a part',
           typeAhead:        true,
           typeAheadDelay:   100,
           triggerAction:    'all',
           valueField:       'id',
           xtype:            'combobox'
        },
        header:     'Part Number',
        width:      280
     }

1 个答案:

答案 0 :(得分:0)

我找到了答案。没有Sencha的帮助。

基本上,您必须确保组合实例和列字段中的组合字段值(显示/值)匹配。

相关问题