PDA

View Full Version : Grid prevents scrolling of page



J
25 May 2007, 1:50 AM
I'm displaying a grid with a few rows on a page. The height of the grid is enough to prevent the need for scrolling inside the grid. Nonetheless, while the mouse is over the grid, I can't scroll the page up and down.

How can I prevent the grid to stop the scroll event?

I'm willing to hack a bit in Ext's code if there isn't a one-click solution, but I need at least a bit guidance about where to start looking. Thanks.

J
29 May 2007, 2:15 AM
Do I have to buy some premium license first before getting an answer?

BernardChhun
29 May 2007, 2:53 AM
no J

tryanDLS
29 May 2007, 8:04 AM
Getting an answer is dependent on whether a) someone has the time, b) has the answer, c) understands what you're trying to do.

As to what you're trying to accomplish, you might try overriding gridview.handeScroll to let the event bubble up or possibly just unhook the scroll event.

J
30 May 2007, 6:25 AM
As to what you're trying to accomplish, you might try overriding gridview.handeScroll to let the event bubble up or possibly just unhook the scroll event.

That sounds like what I needed. Thanks! I'll report back when I made some progress.

J
31 May 2007, 3:44 AM
Ok, my primitive workaround looks like this.


handleWheel : function(e){
var d = e.getWheelDelta();
var before = this.scroller.dom.scrollTop;
this.scroller.dom.scrollTop -= d*22;
var after = this.scroller.dom.scrollTop;
this.lockedBody.dom.scrollTop = this.mainBody.dom.scrollTop = this.scroller.dom.scrollTop;
if ( before != after )
e.stopEvent();
},

I'm sure there is a more elegant solution and would welcome to see that integrated. Thanks to Tryan for the hint in the right direction.