Scroll event on a ListView in ExtJS3.x
I have a ListView in ExtJs3.1 and I have been trying to listen on the 'scroll' event. Most examples I've seen for controls such as panels specify the following:
panel.body.on('scroll', function(a, b, c){ //put logic here });
now the problem with the ListView is that it doesn't have a body attribute, not that I have seen in fireBug. I tried appending the event onto the innerBody o开发者_如何学编程f the listView but obviously this did not do anything.
Any help would be appreciated. Thanks
I am pretty sure I am missing something very basic but I have spent about 2 hours pouring through Docs and Source files now.
I found a workaround!
Although the listView does not expose a body attribute as such, that isn't to say we cannot access the body. using CSS selectors I got the body of the listView by doing the following:
var body = listView.el.child('.x-list-body');
That body variable is of XType Ext.Element and I can now listen on the scroll event as well as called the scroll method and the scollIntoView method.
is the listview itself scrolling or the panel's body?
精彩评论