-
18 May 2012 3:12 AM #21
this is how my view config looks like :
but it didnt worked I put empyfn to in veiwconfig but no sucess then as a last resort this worked :Code:viewConfig: { columnLines : true, loadingText : undefined, loadMask : false, preserveScrollOnRefresh : true, onStoreLoad: Ext.emptyFn },
Code:grid.load(function(){ grid.getEl().down('.x-grid-view').scrollTo('top', prev_scrollPosition, false); })EXT Js Developer
-
18 May 2012 4:41 AM #22
...strange. Check out the doc. http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.View-cfg-preserveScrollOnRefresh
Glad to see you've got it working though.
-
14 Jun 2012 8:56 AM #23
"preserveScrollOnRefresh: true" works for me in 4.1, except in Chrome. Anyone else see this behavior?
-
14 Jun 2012 9:44 PM #24
I used it too, but it didn't worked for me in any browser that's why I manually displaced scroller to prev_location on "Load(callback(prev_location))"
did you tried on IE 8~9 I wonder why it has different output for different developers, may be because the approach used by every developers is different!
EXT Js Developer
-
15 Jun 2012 9:10 AM #25
Thanks for the reply, waqer. I agree that it could be related to different implementations. We are using MVC and doing a reconfigure on the grid. Works for us in IE9 and Firefox. Only seeing a problem in Chrome. We actually have two grids inside different panels in a ViewPort. Strange, I just noticed the scroll bar only resets in one of the grids! Going to have to look more closely at the View definitions!
-
17 Jun 2012 11:51 PM #26
-
15 Aug 2012 5:47 AM #27
To preserve scroll position in Ext.tree.Panel
To preserve scroll position in Ext.tree.Panel
I'm using ExtJS 4.1.1 and was trying to preserve the scroll position of Ext.tree.Panel and
did not work for me, but the following did and I imagine it would work for a normal grid as well:Code:viewConfig:{ "preserveScrollOnRefresh: true"
1. Created a global var:
2. Before my grid reload:Code:var scrollPosition = 0;
3. In my load event handler for my Ext.data.TreeStore:Code:scrollPosition = treePanel.getEl().down('.x-grid-view').getScroll();
Code:if( scrollPosition != 0 ) { schedTree.getView().scrollBy( 0, scrollPosition.top, false ); }
-
26 Sep 2012 3:00 AM #28
Create Ext.grid.Panel with remote DB scrolled to given element
Create Ext.grid.Panel with remote DB scrolled to given element
How I can create Ext.grid.Panel with remote DB scrolled not to top? Ext 4.1.1.
This is fragment of my Ext.grid.Panel config:
If I set a breakpoint, then after it both variants (restoreScrollState or focusRow) works fine. But in realtime they don't works. How can I do this?Code:viewConfig: { trackOver: false, preserveScrollOnRefresh: true, }, listeners: { viewready: function() { this.getView().scrollState.top=300; this.getView().restoreScrollState(); // this.getView().focusRow(30); } },
-
6 Dec 2012 3:27 AM #29


Reply With Quote

