Author: dmorozov
Date: 2007-06-28 14:11:33 -0400 (Thu, 28 Jun 2007)
New Revision: 1377
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Add restoreScrollState method
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-28
17:37:19 UTC (rev 1376)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-28
18:11:33 UTC (rev 1377)
@@ -138,6 +138,18 @@
this.getBody().hideColumn(index, frozen);
if(this.getFooter()) {this.getFooter().hideColumn(index, frozen);}
this.updateLayout();
+ },
+
+ restoreScrollState: function(state, start, end) {
+ this.getBody().scrollBox.getElement().scrollTop = state.pos;
+ this.getBody().currentPos = state.pos;
+ this.getBody().setScrollPos(state.pos);
+ this.getBody().currRange.start == start;
+ this.getBody().currRange.end = end;
+ },
+
+ getScrollPos: function() {
+ return this.getBody().currentPos;
}
});
Show replies by date