0
votes

I have rowediting grid that gird have two combos and two text field.

when type some character on combo box that combo box filter that type word from drop down list select that filter value and form combo and do save record ok and gird view record correctly NEXT--- after that select one of the gird record and start edit that record.type some character on combo box but that combo don't filter that type word form drop down list.

note: that happen clearFilter(true); after save/update record. If i remove clearFilter(true); gird view combo filtered result only that why I clear filter data before load store

This is my combo box grid column

{
    xtype: 'gridcolumn',
    itemId: 'colId',
    width: 140,
    dataIndex: 'ID',
    menuDisabled: true,
    text: 'Name',
    editor: {
        xtype: 'combobox',
        id: 'cbold',
        itemId: 'cbold',
        name: 'CBO_ID',
        allowBlank: false,
        displayField: 'NAME',
        queryMode: 'local',
        store: 'Store',
        valueField: 'FIELD_ID'
    }
},

This gird RowRditing

            plugins: [
                Ext.create('Ext.grid.plugin.RowEditing', {
                    saveBtnText: 'Save',
                    pluginId: 'grdEditor',
                    autoCancel: false,
                    clicksToMoveEditor: 1,
                    listeners: {
                        edit: {
                            fn: me.onRowEditingEdit,
                            scope: me
                        }
                    }
                })
            ],

onRowEditingEdit function

Ext.Ajax.request({
    url: 'url',
    method: 'POST',
    scope:this,
    success : function(options, eOpts) {
        var store       = Ext.getStore('GridStore');
        var grid = Ext.getCmp('gridFileLyt');

        cbo1Store = Ext.getStore('cbo1Store');
        cbo1Store.clearFilter(true);
        cbo1Store.load();

        cbo2Store = Ext.getStore(cbo2Store);
        cbo2Store..clearFilter(true);
        fldStore.proxy.extraParams = {
            '_ID': ''
        };
        cbo2Store.load();

        if(response.success){
            Ext.Msg.alert('Success', response.msg);

        } else {

            Ext.Msg.alert('Failed', response.msg);


        }
    }

});  

I feel i did some basic mistake please help to me

1
Why do you even intervene on your combo box stores in the onRowEditingEdit function? By default, ExtJs handles these stores and their filters automatically. - Lorenz Meyer
@LorenzMeyer when i don't clear combo store after grid save. grid only view last time filter result only that why I clear filters - user881703
I can't tell you what is different, but I only remove filter on grid. The combos are managed correctly by ExtJs. - Lorenz Meyer

1 Answers

1
votes

Same story here, bro.

I actively use ExtJS 4 and RowEditing since 2011, it always worked, until today when I found this bug. I could not even Google it until I debugged and found out a workaround with clearFilter():

rowEditingPlugin.on('beforeedit', function(editor, e) {
    editor.editor.form.getFields().each(function(field){
        if (field instanceof Ext.form.field.ComboBox) {
            field.store.clearFilter(true);
        }
    });
});