:: Forum >>
adjustScrollHeight
Hi,
I am overriding the adjustScrollHeight method in the grid. I have built a grid that allows rows to be expanded/collapsed when clicked (as described in previous posts). However, scrolling does not work properly. Please see the adjusted code below. I have put debug code at the start of and end of the method. At the end of the method, after I call setScrollHeight(h+3), I make a call to getScrollHeight() and the correct number is returned (i.e. the height with the adjustments made for any expanded grid rows.) However, on entering the method I have a debug line that outputs the scroll height and the height seems to have reverted back to the unadjusted value. Is it possible that the other version of adjustScrollHeight that I am overriding is also being called after it is called in my grid class?
Thanks for any help.
BT
this.adjustScrollHeight = function() {
var expandHeight = 0;
var counter = 0;
for (var row in this.myExpandedRows) {
expandHeight += EXPAND_HEIGHT;
counter++;
}
var h = ((this.getRowCount() - counter) * this.getRowHeight())
+ expandHeight;
h += this.getContentHeight(0);
h += this.getContentHeight(2);
this.setScrollHeight(h+3);
}
Wednesday, March 22, 2006
Yes, most likely the standard adjustScrollHeight handler runs as well. To cancel it you should return non-zero value from your function.
Alex (ActiveWidgets)
Wednesday, March 22, 2006
This topic is archived.
Back to support forum
Forum search