View Full Version : Grid - scrollTo bottom

4 Aug 2012, 4:41 PM
I found a lot of examples how to scroll to any row, but i didnt find the best time when i can call focus function.

1) When i use on load function on store, i need to use defer function with 500 because view will jump back to top. Even so i can see how the view jump from top to bottom.

2) Refresh event on view - same problem - without defer you can see how the view jump from top to bottom

Is there any better way how to scroll from top to bottom or better.. grid view will stay on bottom each time (question is how to do it) or is possible to apply any animation instead of that big jump?



5 Aug 2012, 10:25 PM
Just use following to scroll to specific position of your choice

var scrollPosition = 100;
YourGrid.getEl().down('.x-grid-view').scroll('bottom', scrollPosition, true);


'bottom' refers to side of scrolling, Either "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
scrollPosition refers to position you want to scroll to
true is for animation of scrolling. you may also disableanimation certainly depends on your needs.
check this:-
also, you may checkout the following:-