-
19 Jan 2010 1:48 AM #1
Grid auto scrolls to top of row on mousedown
Grid auto scrolls to top of row on mousedown
Is there any way of disabling this behaviour? I've pored over all the relevent config options and can't find anything. (This is with forceFit: true in the viewConfig, to constrain the grid size and enable the scroll bars.)
Thanks
-
20 Jan 2010 3:33 PM #2
Are you maybe reloading when onmousedown event is triggered?
-
21 Jan 2010 1:26 AM #3
Nope, no reload. This happens with the basic xml grid demo at http://www.extjs.com/deploy/dev/exam.../xml-grid.html, simply with
added to the GridPanel initialistion, and random text added to the xml to pad it out.Code:viewConfig: { forceFit: true, }
-
21 Jan 2010 1:36 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
This is standard behavior (it's a bit unusual that you have rows that are higher than the grid).
If you want to change this you will have to override Ext.grid.GridView.ensureVisible.
-
21 Jan 2010 2:12 AM #5
Not sure what you mean by "rows higher than the grid". There's a lot of data in some of the cells.
Anyway that works, thanks. Fwiw the reason we want to stop this is that if there's a link in a cell, in IE (7 and 8 at least) the scrolling behaviour overrides links - so if you click on a link in a cell whose top is not visible it scrolls to the top and does not follow the link.
-
21 Jan 2010 2:17 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
In that case you could also override Ext.grid.GridPanel.processEvent to not process clicks on an <a> element.
-
21 Jan 2010 3:04 AM #7
I think we'll stick with the quick 'n' dirty approach
. Thanks again.


Reply With Quote