1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    44
    Vote Rating
    0
    ironandsteel is on a distinguished road

      0  

    Default grid with 3000 records- buffered or not, 4.0.7 or 4.1

    grid with 3000 records- buffered or not, 4.0.7 or 4.1


    I'm trying to work out the best strategy here. I got my app working pretty well with 4.0.7 with a buffered store and grid filtering. Although I never founds docs or other info on this, I found that calling filter() on the grid's store actually did what I wanted- the filter params were passed to my server script which returned the filtered records. The only problem I had was that I couldn't do grouping on the data while using a buffered store (which makes sense to me). And, I would sometimes see improper behavior with the vertical scroller.

    When 4.1 beta 1 came out, I tried using it, but my grid didn't display at all. I see my server script getting called to load the store, but it never draws (I saw another forum post related to this).

    So, I now have it sorta working with 4.1 and a non-buffered store, which takes 30 seconds to load the data. The sorta part is that calling filter on the store doesn't do anything. It is not calling my server load script (which is correct), but it is not filtering the results displayed in the grid.

    Here is how I declare the store:
    Code:
        // create the contractor Data Store
        var ContractorStore = Ext.create('Ext.data.Store', 
        {
              id: 'contstore',
            model: 'Contractor.Model',
            proxy: {
                             id: 'contractorStoreProxy'
                   ,type: 'ajax'
                ,url: 'scripts/getContList.php'
                ,reader: {
                        type: 'json',
                    root: 'rows',
                    totalProperty: 'total'
                }
                ,writer: {
                    type: 'json',
                    writeAllFields: false,
                  root: 'rows'
                }
            }
        });
    I have a combobox in my tbar that contains a list of categories that are what I want to filter on. Here is the combobox in the tbar:
    Code:
    ,{
    xtype: 'combo'
    ,id: 'catComboID'
    ,hiddenName:"catCombo"
    ,store: catStore
    ,mode:'local'
    ,displayField:'display'
    ,cls: "catComboStyle"
    ,listConfig: {
        width:'500',
        loadingText: 'Loading...',
        emptyText: 'No categories found.',
        // Custom rendering template for each item
        getInnerTpl: function() {
            return '<div class="oneCatItem">{display}&nbsp({value})&nbsp<span class="catcount">{count}</span></div>';
        }
    }
    ,triggerAction:'all'
    ,width:'400'
    ,listWidth:'600'
    ,listHeight:'800'
    ,forceSelection:true
    //,value : catStore.getAt(0)
    ,emptyText: "ALL CATEGORIES"
    ,flex:1
    ,listeners:{"select":function(theCombo, theRecords, theIndex)
        {
            var catCode = theRecords[0].data.value;
            if (catCode == "all")
            {
                this.ownerCt.ownerCt.store.clearFilter(false);
            }
            else
            {                    
                this.ownerCt.ownerCt.store.filter([{id: "catcode", property: "catcode", value: catCode}]) 
                this.ownerCt.ownerCt.invalidateScroller();
            }
        }
    }
    }]
    }
    I trace thru the code and it indeed reaches the filter call, but there is no effect. Ideas?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    3000 records without buffering will lag. 4.1.0 will perform better than 4.0.7
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Posts
    44
    Vote Rating
    0
    ironandsteel is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    3000 records without buffering will lag. 4.1.0 will perform better than 4.0.7
    Ok- so I guess I'll stick with buffered and 4.0.7 for now. Perhaps someday when 4.1 is more solid, I'll be able to get the buffering to work.
    Thanks

Thread Participants: 1