-
18 Jul 2010 12:44 AM #1
scroll list to the top on refresh
scroll list to the top on refresh
Hi, i've a list dynamically populated from an ajax call and it work fine.
There are only six rows visible, so when i have more than 6 i can scroll to the bottom , and here
is the problem.
If i scroll to the bottom of 20 rows, when i refresh the list with other data (3 rows for example) the
list remain to the bottom and i don't see anything until i manually scroll to the top.
Is there a way to avoid this?
thanks so much
-
18 Jul 2010 7:17 AM #2
After you do the code to refresh the list or store you can use
where timeline is the id of the list.Code:timeline.scroller.scrollTo({x: 0, y: 0}, true); // scroll to the top
-
19 Jul 2010 4:09 AM #3
-
9 Aug 2010 2:03 AM #4
scroller is undefined
scroller is undefined
Hello there,
when using Sencha Touch 0.93beta I get the error that the property scroller is undefined for both list and panel.
What am I missing?
Thanks in advance and for the great community support
Florian
-
9 Aug 2010 4:25 AM #5
Probably either
a) You haven't setup scrolling on your panel
b) The panel isn't rendered yetEvan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
9 Aug 2010 4:33 AM #6
a) scrolling is set to 'vertical'
b) the AJAX request triggering the alert is made well after the initial loading of the tabpanel I use
Can you give me a simple example where is is used in a small demo application?
-
9 Aug 2010 4:36 AM #7
Code:Ext.setup({ tabletStartupScreen: 'tablet_startup.png', phoneStartupScreen: 'phone_startup.png', icon: 'icon.png', glossOnIcon: false, onReady: function() { var html = []; for(var i = 0; i < 500; ++i){ html.push('line ' + i); } var p = new Ext.Panel({ fullscreen: true, scroll: 'vertical', html: html.join('<br />') }); p.scroller.scrollTo({ x: 0, y: 1000 }, true); } });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
9 Aug 2010 4:49 AM #8
My mistake was somewhere else, but you still helped me figure it. Cheers!
Similar Threads
-
Scroll top down for Panel like Tabpanel
By tomalex0 in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 30 Jun 2010, 11:20 PM -
[CLOSED] [2.0.2] Pb in refresh top compoment
By alacenaire in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 1 Oct 2009, 7:22 AM -
setting scroll top in grid
By aseem_jain in forum Ext GWT: Help & Discussion (1.x)Replies: 0Last Post: 17 Jun 2009, 1:51 AM -
TextArea Scroll to Top
By DirtDog in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 1 Jun 2009, 11:09 AM


Reply With Quote