:: Forum >> Version 2 >>

Vertical scrollbar missing in IE

We're in the process of transitioning from 1.0 to 2.0, largely due to the excellent virtual mode in version 2, but I've run into a glitch in IE and I'm hoping someone can help us out.

We use AJAX to grab records from the server, and then add them to grid's data array. We've discovered that we can't use the addRow() function, as it performs a refresh after each add and when adding 300+ records at once, the grid just grinds for a good 30 seconds. So we need to push each record onto the data array and then after all are added, set the count and refresh the grid. But herein lies the problem: IE doesn't display the horizontal scrollbar until I click on a column to perform a sort, even with 200 records in the grid. I've scoured the forum and tried every trick I could find (including obj.raiseEvent("adjustScrollBars")) and nothing seems to work.

Any ideas anyone?
Jesse
Wednesday, February 15, 2006
I would try adding -

obj.raiseEvent("adjustScrollHeight");
obj.raiseEvent("adjustScrollBars");

You actually wrote that horizontal scrollbar is missing. If this is not a mistake - then it should be

obj.raiseEvent("adjustScrollWidth");
obj.raiseEvent("adjustScrollHeight");
obj.raiseEvent("adjustScrollBars");

Alex (ActiveWidgets)
Wednesday, February 15, 2006
Apologies, I did mean the vertical scrollbar was missing -- amazing how one can read and re-read before posting and still screw it up :)

So that worked! I really, really appreciate the help, it was driving me crazy. We love this widget, btw.
Jesse
Wednesday, February 15, 2006
I'm having a similar problem that Alex's solution does not solve, unfortunately.
Here's the scenario:

1. Grid has vertical scroll bar, and user scrolls down to end of list
2. User filters list by selecting an option from a select box outside the grid
3. Filter code runs, redraws table
4. Only a subset of the filtered data is displayed and the grid looks like it is cut off, with stuff missing from the top.
5. If I select another filter option from the list, it redraws OK, with the scrollbar present.
6. IF the user did NOT scroll to the end of the list before filtering, there is no problem.

This is in IE6, by the way.

Here is my filter function. I've tried obj.refresh() also.

function filter(value){

if (value == "All") {
obj.setRowCount(tableData.length);
obj.setRowIndices("");
} else {

var i, rows = [], max = getOriginalRowCount(obj,0);

for (i=0; i<max; i++){

if (obj.getCellValue(PTCOLUMN_ROLE, i) == value){
rows.push(i);
}
}
obj.setRowCount(rows.length);
obj.setRowIndices(rows);
}

obj.raiseEvent("adjustScrollHeight")
obj.raiseEvent("adjustScrollBars")

}

LanceH
Tuesday, April 11, 2006
Probably you should also add obj.setScrollTop(0);
Alex (ActiveWidgets)
Tuesday, April 11, 2006
Yes! If I add that before the raiseEvents, and obj.refresh() after, it works. Thanks!
LanceH
Wednesday, April 12, 2006



This topic is archived.

Back to support forum

Forum search