1. #131
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Argentina
    Posts
    34
    Vote Rating
    1
    grpbhb is on a distinguished road

      0  

    Default


    FilterBar + Bufferd Store + Memory Proxy
    The FilterBar feature searchs only in the current page not in all pages!
    Thankyou.

    Code:
    
    
    Code:
    var store = Ext.create('Ext.data.Store', {
    				model : 'Mediciones',
    				remoteSort : false,
    				remoteFilter : false,
    				autoDestroy : true,
    				autoLoad : false,
    				pageSize : 100,
    				buffered: true,
    				proxy : {
    					type : 'memory',//'pagingmemory',
    					reader : {
    						type : 'json',
    						root : 'list'
    					}
    				}
    			});

  2. #132
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    in buffered store the store have only the loaded page of records so the plugin can't have access to the entire dataset. Maybe you have to load all pages first.

  3. #133
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Argentina
    Posts
    34
    Vote Rating
    1
    grpbhb is on a distinguished road

      0  

    Default


    I found the fix. The bug is in the method filter of the Store.
    My solution in green.

    Code:
    filter: function(filters, value) {
            if (Ext.isString(filters)) {
                filters = {
                    property: filters,
                    value: value
                };
            }
    
    
            var me = this,
                decoded = me.decodeFilters(filters),
                i = 0,
                doLocalSort = me.sorters.length && me.sortOnFilter && !me.remoteSort,
                length = decoded.length;
    
    
            for (; i < length; i++) {
                me.filters.replace(decoded[i]);
            }
    
    
            if (me.remoteFilter) {
                
                delete me.totalCount;
                
                
                
                
                if (me.buffered) {
                    me.pageMap.clear();
                    me.loadPage(1);
                } else {
                    
                    me.currentPage = 1;
                    
                    me.load();
                }
            } else {
                
                if (me.filters.getCount()) {
                    me.snapshot = me.snapshot || me.data.clone();
                    if(me.proxy.type != 'pagingmemory'){
    me.data = me.data.filter(me.filters.items);
                    }
                    else{
                        var list = new Ext.util.MixedCollection(),           
                             items = Ext.Array.clone(me.proxy.data);
                        for(i=0;i<items.length;i++){
                            list.add(Ext.create(me.model,items[i]));
                        }
                        me.data = list.filter(me.filters.items);
                   }
                    if (doLocalSort) {
                        me.sort();
                    } else {
                        
                        me.fireEvent('datachanged', me);
                        me.fireEvent('refresh', me);
                    }
                }
            }
        },

  4. #134
    Sencha User
    Join Date
    Dec 2012
    Posts
    13
    Vote Rating
    0
    lelit is on a distinguished road

      0  

    Default


    Trying out this great plugin with the recently released 4.2.0.663, there is compatibility issue: in a few places it calls
    Code:
    me.grid.headerCt.getGridColumns(true)
    , where in previous versions of ExtJS that
    Code:
    true
    meant refresh the cache.

    Current version of that method does not accept the flag anymore, its only arguments are declared private... and thus an error is raised about “result.push() is not a function”, in grid/header/Container.js at line 883.

    As a quick fix, simply removing the parameter let me go further in my tests.

  5. #135
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    thanks lelit, i've noted that too

  6. #136
    Sencha Premium Member milestonebass's Avatar
    Join Date
    Dec 2009
    Posts
    21
    Vote Rating
    0
    milestonebass is on a distinguished road

      0  

    Default Setting width issue

    Setting width issue


    When setting a column width, the filterbar field for that column is not being initially rendered. However, flexes work fine.

    Has anyone else experienced this problem (and got a possible solution/explanation)?

    Code:
    plugins: [{
    ptype: 'filterbar',
    renderHidden: false,
    showShowHideButton: true,
    showClearAllButton: true
    }],
    Code:
    {
    xtype: 'gridcolumn',
    dataIndex: 'name',
    width: 200,
    text: 'Role',
    filter: true
    },
    Behavior:
    The filter bar is initially hidden when the grid's backing store is loading (ajax load). Once loaded, the filterbar shows and the filters on columns with specified widths are not rendered. A hide, then show (using the show/hide icon) renders the fields correctly.

  7. #137
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    @lelit: thanks for sharing this, saved me some time ;-)

  8. #138
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    278
    Vote Rating
    2
    wki01 is on a distinguished road

      0  

    Default


    Quote Originally Posted by lelit View Post
    Trying out this great plugin with the recently released 4.2.0.663, there is compatibility issue: in a few places it calls
    Code:
    me.grid.headerCt.getGridColumns(true)
    , where in previous versions of ExtJS that
    Code:
    true
    meant refresh the cache.

    Current version of that method does not accept the flag anymore, its only arguments are declared private... and thus an error is raised about “result.push() is not a function”, in grid/header/Container.js at line 883.

    As a quick fix, simply removing the parameter let me go further in my tests.
    I replaced

    Code:
    me.grid.headerCt.getGridColumns(true)
    with

    Code:
    me.grid.headerCt.getGridColumns()
    but I always get result.push () is not a function
    I do something wrong?

    thanks

  9. #139
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    Search the file also for just

    HTML Code:
    .getGridColumns(true)
    than you should find one more and it should work

  10. #140
    Sencha User
    Join Date
    Sep 2011
    Location
    Taiwan
    Posts
    74
    Vote Rating
    0
    cwtuan is an unknown quantity at this point

      0  

    Default


    any update for ExtJS 4.2?
    Thanks!