:: Forum >>

No Horizontal Scroll Bar While No Is Data Found

In my case which has more columns than are displayed , there exists horizontal scroll bar while the grid contains data, but does not while the grid contains no data. How can I show the horizontal scroll bar while no data is found in the grid.

p.s. I had tried with obj.getTemplate("layout").action("adjustSize");
, but it did not work in my case.

Thanks for your help!!! :)
Jack
Monday, November 7, 2005
http://activewidgets.com/javascript.forum.5870.3/remove-vertical-scroll-bar.html
Monday, November 7, 2005
.active-scroll-bars {overflow-x: scroll; }
Monday, November 7, 2005
thanks for your reply, but it doesn't work in my case....

I am curious about why the scroll bar disappears while there is no data in the grid though there are columns more than are displayed.... :)
Jack
Tuesday, November 8, 2005
I have the same problem , any solutions yet ?
Samir
Tuesday, November 8, 2005
I think this is a bug.
Modify the file source\lib\templates\scroll.js Row140-145
space.runtimeStyle.height = data.scrollHeight > data.offsetHeight ? data.scrollHeight : 0;
space.runtimeStyle.width = data.scrollWidth > data.offsetWidth ? data.scrollWidth : 0;

like this
var c = this.getColumnProperty("count");
var i = this.getTopTemplate().getId();
var w = 0;
for(var j = 0; j < c; j++)
w += document.getElementById( i + ".item:" + j ).scrollWidth;
space.runtimeStyle.height = data.scrollHeight > data.offsetHeight ? data.scrollHeight : 0;
space.runtimeStyle.width = data.scrollWidth > data.offsetWidth ? data.scrollWidth : w;

to fix this bug.
Sage(ActiveWidgets.cn)
Thursday, November 17, 2005
please modify the code
var w = 0;
to
var w = (!window.HTMLElement) ? 0 : 20;
for firefox
Sage(ActiveWidgets.cn)
Thursday, November 17, 2005
Thank you, Sage. It works!! :)
Jack
Thursday, November 17, 2005
I was having a similar problem where having more columns than the width of the window resulted in a horizontal scrollbar showing up in Firefox, but not IE. I first tried to fix the stylesheet:

.active-scroll-bars {overflow-x: scroll; }

That added a gray-ed out horizontal scrollbar in IE, so I tried Sage's code next. It fixed things partially. It made the scrollbar appear, and the header rows moved when I scrolled, but the data rows remained in place.

Any suggestions would be appreciated.
Dan
Friday, December 2, 2005
realized it was just a type-o in my css. I had misspelled overflow in the following line:

.active-scroll-data{position:absolute;overflow:hidden;top:0px;left:0px;width:100%;height:100%;padding:18px 0px 0px 0px;z-index:1;}
Dan
Friday, December 2, 2005

This topic is archived.


Back to support forum

Forum search