开发者

How do I stop ExtJS from clearing my combo boxes in a grid?

开发者 https://www.devze.com 2023-04-11 12:37 出处:网络
I have a GridPanel in ExtJS 4.02 that contains a combobox column. I am also using a RowEditor.The grid renders fine but when I click on any row, the combo goes blank.The user has to remember the prev

I have a GridPanel in ExtJS 4.02 that contains a combobox column.

I am also using a RowEditor. The grid renders fine but when I click on any row, the combo goes blank. The user has to remember the previous value even if they aren't changing the combo. Very annoying.

Here is my column:

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


I found the answer. With no help from Sencha.

Basically, you have to make sure that the combo field values (display/value) match in both the combo instance AND the column field.

0

精彩评论

暂无评论...
验证码 换一张
取 消