Results 1 to 2 of 2

Thread: EXTJS 4 Multi-select combobox grid filter

  1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    13

    Default EXTJS 4 Multi-select combobox grid filter

    I have a extjs grid with multiple filters applied on each column header
    Multiselect combobox is used for filtering.Now the problem is when I select values from the multiselect
    combobox say from one column , the grid is filtered correctly but,when I select values from the multiselect combobox from other column,the first filter is ignored from the store and second filter is applied.Kindly help me in solving this problem, there are around 20 columns,each has a column header filter associated with it, I want filter to be applied based on the previous filter.
    Below is the code :

    Code:
    var i, value, combos = ['data_index_1','data_index_2','data_index_3','data_index_4'];
        store.clearFilter(false);
            for (i = 0; i < combos.length; i++){
                value = Ext.getCmp(combos[i]).getValue();            
                if (!Ext.isEmpty(value)){
                    if(Ext.isArray(value)){
                        store.filterBy(function(record, id){
                            return Ext.Array.indexOf(value, record.get(combos[i])) !== -1);                     
                        });
                    }
                }
            }

  2. #2
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    I'd like to test this along with you. Can you post a simple test case either inline here or at https://fiddle.sencha.com that reproduces the issue?


    Regards,
    Brian

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •