PDA

View Full Version : Grouped List weirs on store reload



manvinder
23 Oct 2013, 8:09 PM
Hi,

I am using grouped list in my project. On item tap the group of the item changes from one to another so I have reloaded the store. but the problem is that the list doesn't refresh until list is scrolled.

Please help me its urgent.

46533


46534



46535


here are the snapshots of the groped list. on tap on plus sign the group field of the record changes and it is/should move to the upper part of the list. I am able to change the group field and it changes but it gets visible only after scrolling the lower group up to the top the screen until the header area shops the place holder as shown in the circle.

here is the code of list I am using..


{
id: 'teamListId',
xtype: 'list',
scrollable: true,
itemTpl: new Ext.XTemplate('<div class="teamInfo">',
'<div class="teamName">{teamName}</div>',
'<div class="teamStatus">',
'<tpl if="isMyTeam === true">',
'<img src="resources/images/check.png"/>',
'<tpl else>',
'<img src="resources/images/add.png"/>',
'</tpl>',
'</div>',
'</div>'),
store: 'Team',
itemCls: 'teamListItem',
action: 'teamListItemTap',
grouped: true,
flex : 1
}



and here is the code segment to update the record group..

Ext.data.JsonP.request({
url: strUrl,
params: {
Id : Id,
param2 :paramValue2,
param3 : paramvalue3,
},
success : function(response, opts) {
if(response.result == 'success') {
var teamStore = Ext.getStore('Team');
teamStore.load({
params: {
league_Id : leagueId,
subscriber_email : userEmail
}
});
}
},
failure : function(response, opts) {
Ext.Viewport.setMasked(false);
if (response.timedout) {
Ext.Msg.alert('Timeout', 'The server timed out. Please try again later.', Ext.emptyFn());
}
else if (response.aborted) {
Ext.Msg.alert('Aborted', 'Looks like you aborted the request!', Ext.emptyFn());
}
else {
Ext.Msg.alert('Bad', 'Something went wrong with your request.', Ext.emptyFn());
}
}
});

mitchellsimoens
28 Oct 2013, 12:16 PM
Are there any errors being thrown? I remember that there was an issue that was resolved, not sure what version it was fixed in. I just created a test and refreshing the store worked as expected for me in 2.3.0

manvinder
29 Oct 2013, 5:19 AM
It works fine on browser and also on android and iOS devies, I am getting this rendering issue only on iOS 6. And also not getting any error while rendering.

manvinder
24 Nov 2013, 7:51 PM
I was using opacity to make list item semi-transparent in itemCls teamListItem. removing that solved the problem. I don't know why because the same thing is also working fine in other lists in the same app. and this list also works fine in iOS 7 and android.