View Full Version : [FNR] Grid horizontal scrollbar not working properly

9 Sep 2010, 9:57 AM
Ext version tested:


Adapter used:


css used:

only default ext-all.css

Browser versions tested against:

FF3 (firebug installed)

Operating System:

WinXP Pro


In my application i have two many columns in grid so it shows horizontal scroll bar now if i scroll horizontal scroll bar and Select row sometime what it does it take back the horizontal scroll bar to starting. same issue is there in Ext GWT example.

Steps to reproduce the problem:

click on basic grid.
re-size width of one column so that its start showing horizontal scroll.
now select rows after selecting row 5-6 times or may be in first time its move the horizontal scroll back to start position.

The result that was expected:

if user clicks on any row it should not move the horizontal scroll to start.

The result that occurs instead:

selecting row 5-6 times or may be in first time its move the horizontal scroll back to start position.

Jamie Avins
9 Sep 2010, 10:09 AM
Please try to follow the bug posting guidelines (http://www.sencha.com/forum/showthread.php?71015-Posting-to-the-Bug-Forum), I'm having hard time following you.

10 Sep 2010, 9:10 PM
As per my knowledge issue could be due the fact its calling handleMouseDown function of GridSelectionModel on mousedown in that its calling focusCell function of gridview class. focuscell function takes three parameter rowIndex, colIndex and one boolean hscroll. Value of Hscroll is "true". focusCell function is calling ensureVisible function and passing all the three parameters as it is. so as Hscroll is true EnsureVisible function does some manipulation on horizontal scroll and scroll it to start.

Could somebody please update me whether my finding is correct or not as i am in urgent need of solution.

14 Sep 2010, 1:43 AM
If you click on the first cell, than it will make that cell visible and so adjusts horizontal scrolling. Is that what you are describing? If you always click the second cell, it wont scroll.

However it should not scroll, i updated the code.

14 Sep 2010, 2:08 AM
Fix is in SVN as of revision 2226 for GXT 2.2.1

14 Sep 2010, 9:42 AM
Bug i am describing is that if we have a grid and there is horizontal scroll and user move the horizontal scroll to end and click to select different different row and keeps on doing the same after doing 5-6 times it moves back horizontal scroll back to starting.

you can get the same issue in the demo shown for ext gwt basic grid example also, there is no horizontal scroll to produce bug so you need to increase width of any column such that its start showing horizontal scroll.

i hope above information should clarify you bug in more details.

kindly update me what workaround i should follow to fix the above issue.

14 Sep 2010, 12:22 PM
The workaround would be to change the GridSelectionModel and call ensureVisible with the hscroll attribute set to false (this change is also in SVN already).