1. #11
    Ext JS Premium Member
    Join Date
    Oct 2009
    Location
    Melrose, MA
    Posts
    48
    Vote Rating
    3
    hjones is on a distinguished road

      0  

    Default


    Thanks so much mag_42...this helped me a lot.

    My use case appears to be a little different.

    I have remoteSort = true, remoteGroup = false.

    So I changed the logic in GroupingStore:groupBy a little...

    Code:
    Ext.override(Ext.data.GroupingStore, {
        clearGrouping : function(noreload){
            this.groupField = false;
    
            if(this.remoteGroup){
       ...
       ...
        ...
                 if (!noreload) {  // <<< FIX: Stop the forced reload
                    this.reload();
                }
            }else{
                if (!noreload) {  // <<< FIX: Stop the forced reload
                    this.sort();
                    this.fireEvent('datachanged', this);
                }
            }
        },
    
        groupBy : function(field, forceRegroup, direction, noreload){
       ...
       ...
       ...
             if (!noreload) {
                if (this.remoteGroup) {
                    this.on('load', fireGroupEvent, this, {single: true});
                    this.reload();
                } else {
                    this.sort(sorters); // Note that this call results in a load of the store if remoteSort=true
                    fireGroupEvent.call(this);
                }
      ...
        ...
       ...
       }
    })
    The main problem being that both reload and sort can result in a call to the server.

    We should probably entry a bug on this...because the state persistence is not working consistently for all persisted grid attributes.

    The Grouping feature is awesome and a big selling point - its unacceptable to have these patches floating around from Ext JS release to release - that's a lot of baggage and patching that has to be maintained.

    Really appreciated your help on this.

  2. #12
    Ext User
    Join Date
    Apr 2009
    Posts
    19
    Vote Rating
    0
    Mag_42 is on a distinguished road

      0  

    Default


    Ah yes.. all my grids that have remoteSorting also support remote grouping but if I should do that too.

  3. #13
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    I just came across this bug as well. I'm on 3.3.1 and it seems to work as expected in firefox, but does force the autoload (even if disabled) only in IE.