:: Forum >>

Vertical scrolling resets itself to top position after a second

I've got an Extended grid whose data is both wider and taller than the grid itself, so it displays with vertical and horizontal scrollbars. Scrolling horizontally works fine, but when I scroll vertically, the grid immediately jumps back to the top. Has anyone seen this problem before?

The code for my grid is this:

var obj = new AW.Grid.Extended;
obj.setId("myGrid");
obj.setFixedLeft(1);

var columnHeaders = <array of strings>;
obj.setColumnResizable(false, 0);
obj.setCellFormat(new AW.Formats.Number, 1);
obj.setColumnResizable(false, 1);
obj.setCellFormat(new AW.Formats.Number, 2);
obj.setColumnResizable(false, 2);
obj.setCellFormat(new AW.Formats.Number, 3);
obj.setColumnResizable(false, 3);
var totalRow = <array of strings>;
var data = <array of array of strings>;
obj.setRowCount(19);
obj.setColumnCount(4);

obj.setHeaderCount(2);
obj.setHeaderText(columnHeaders, 0);
obj.setHeaderText(totalRow, 1);
obj.setCellText(data);

obj.setStyle("width", "100%");
obj.setStyle("height", "300px");
obj.setSelectorVisible(false);
obj.setCellEditable(false);

document.write(obj);

Thanks!
Aaron Whittier
Saturday, April 8, 2006
Does it happen in IE, Firefox or both? Is your grid inside <table> tag? Are you using 2.0 final (not beta or RC)?
Alex (ActiveWidgets)
Monday, April 10, 2006
This is in firefox 1.5.0.1, and the grid is inside a table. I am using the 2.0 final trial edition. If it helps, I have the FireBug extension (it reports javascript and css errors) and I'm not seeing any errors either during page load or when I attempt to scroll.
Aaron Whittier
Tuesday, April 11, 2006
Try adding style="table-layout:fixed" to the <table> tag.
Alex (ActiveWidgets)
Tuesday, April 11, 2006
That fixed it - thanks Alex!
Aaron Whittier
Tuesday, April 11, 2006

This topic is archived.


Back to support forum

Forum search