View Full Version : [ListView] Scrolling a ListView's body down

28 Apr 2009, 1:33 AM

I'm having some issues getting a ListView instance to scroll down. I have a Panel that contains a ListView with a specific height. If a lot of elements get added to the ListView (through the store), a scrollbar is automagically added to the ListView's body, as it should. However, I also want the ListView to scroll down to the bottom. I've tried the following:

listView.getEl().scroll('bottom', 1000)
listView.getEl().child('.x-list-body').scroll('bottom', 1000)
listView.getEl().child('.x-list-body-inner').scroll('bottom', 1000)
None of this works however. Anyone got any better ideas? Thanks in advance!

28 Apr 2009, 2:09 AM

var listViewBody = listView.el.child('.x-list-body');
listViewBody.scrollTo('top', listViewBody.getHeight());

28 Apr 2009, 2:34 AM
That works beautifully. Thanks! :-)