PDA

View Full Version : GridPanel & Grouping Store not refreshing in IE



jbeaven
30 Apr 2012, 4:01 PM
So the code that I have seems to work fine in Firefox but in IE the grid doesn't refresh and show the new grouping when we make a change to the store. We're changing an Active/Inactive flag in the record and the flag is used in order to group the records appropriately. Here's the code:


updateSelectionField : function(field, newValue) {
this.getSelectionModel().each(function(rec){
rec.set(field, newValue);
// if they become inactive, they are no longer eligible
if(rec.get('active') == 'Inactive') {
rec.set('scheduled', false);
}
});
this.store.save();

//update
this.store.applyGrouping(true);
this.store.autoFilter();
this.getSelectionModel().clearSelections();
this.store.reload();
this.getView().refresh();
}


This is a function on the GridPanel. Thanks for any help, thoughts? I should mention that I have tried:


<grid>.render();

with no success.

jbeaven
1 May 2012, 10:09 AM
No thoughts anyone? Not even an, "Only idiots use IE," remark?

jbeaven
3 May 2012, 5:45 AM
No one else has experienced anything like this? I'm kinda at my wit's end here and am starting to think destruction and recreation of the GridPanel is the only way to have this thing reload correctly.

Edit: The odd thing is that if you watch the component it changes to what it's supposed to be for a split second and then goes back to its original state.

jbeaven
3 May 2012, 9:04 AM
Ok...so for those of you playing along at home a co-worker thought to look at what data was getting sent back after the save/reload process was getting called. And while the save worked the reload was calling at the same time/before the save was getting processed so to get it to work I did this:


function storeReload (){
this.store.reload();
};
this.store.on('save', storeReload());

this.store.save();

//update
this.store.un('save', storeReload());


Again...it worked fine in FF but in IE it wasn't working for whatever reason.