PDA

View Full Version : Not getting vertical scrollbar in ListView



brianm8675309
4 Dec 2009, 10:49 AM
Hello,
I am working with a listview for the first time, and am unable to get the vertical scrollbars to appear despite having data much taller than the height of the panel in which I have embedded the listview. Attached below is the code. I tried to follow the example browser sample for listview closely, but no luck.

Thanks,
Brian


Ext.onReady( function() {
Ext.QuickTips.init();
var groupMembersDataStore = new Ext.data.ArrayStore({
url: 'groupmaintenance?method=getgroupmembership',
fields: [ 'id', 'name' ]
});
groupMembersDataStore.load({params:{'groupid':101}});
var currentMembersListView = new Ext.ListView({
store: groupMembersDataStore,
multiSelect: true,
emptyText: 'Please select a group above',
reserveScrollOffset: true,
columns: [{
header: 'Id',
width: .1,
dataIndex: 'id'
},{
header: 'Name',
dataIndex: 'name'
}]
});
var panel = new Ext.Panel({
id:'group-members-view',
width:250,
height:250,
layout:'fit',
title:'Group Members',
items: currentMembersListView
});
panel.render(document.body);
} );

4 Dec 2009, 10:56 AM
Hi BrianM,

What OS are you having trouble with? Also what version of Ext JS are you using?

Please remember to post code within code tags in the future.

Welcome to the forums :)

brianm8675309
4 Dec 2009, 11:01 AM
Thanks :) and I will keep that in mind.

I am using Ext JS 3.0.0, and have tested this both in Chrome 3 and IE 8 with the same behavior. I am running on WinXP.

4 Dec 2009, 11:04 AM
Try removing reserveScrollOffset: true,
from your config. I never use it.

Also does this happen with Firefox?

brianm8675309
4 Dec 2009, 11:08 AM
Same behavior in Firefox, and removing reserveScrollOffset: true does not change the behavior.

brianm8675309
7 Dec 2009, 2:14 PM
I ended up trying the sample included w/ the extjs download (3.0.0) and found the same problem in my own code. Searching around more, I found this post which discusses this as a bug.

http://www.extjs.com/forum/showthread.php?t=76300

It is fixed in 3.0.3, I upgraded and I now have scrollbars.