PDA

View Full Version : grid.BodyScroll



INeedADip
26 Sep 2006, 12:13 PM
I have a question on the bodyScroll Event. I have 5 rows in my grid (because I'm testing), and can't figure out what the parameters are on the scroll.

In your "A primer on the Grid?s new event system" post you have:
bodyscroll - (this, rowIndex, columnIndex, e)

I'm using it like: grid.addListener('bodyscroll', this.bodyScroll);

But when I log the arguments passed in I get a lot of wierd numbers.
[0,22]
[0,57] etc...

Can you explain how (if) I can figure out when they scroll to a particular row?

Thanks.

PS: Excellent Grid.....

jack.slocum
26 Sep 2006, 2:35 PM
Sorry about that, it was an editing error that has been corrected. rowIndex, colIndex wouldn't make a lot of sense for a scroll event.

The signature is (scrollLeft, scrollTop).

Those are the scroll values for the wrapper element which handles scrolling.

Jack